Skip to content

Commit e7a790b

Browse files
committed
Add DashDotLines schema which inherits from Curve schema. This primitive is a list of lines or polylines, whose width will be constant on the screen. And the primitive can have dash-dot patterns. Add DashDotPatternAPI schema which is for the dash-dot patterns.
A new primitive HdDashDotLines is also added in storm, to implement the DashDotLines schema.
1 parent efe40e2 commit e7a790b

File tree

215 files changed

+11939
-98
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

215 files changed

+11939
-98
lines changed

LICENSE.txt

Lines changed: 34 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -762,7 +762,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
762762
AVIF/src/obu.c, renamed in this repository as AVIF/src/avif_obu.c
763763
================================================================
764764

765-
Copyright © 2018-2019, VideoLAN and dav1d authors
765+
Copyright 2018-2019, VideoLAN and dav1d authors
766766
All rights reserved.
767767

768768
Redistribution and use in source and binary forms, with or without
@@ -878,3 +878,36 @@ SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
878878
FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
879879
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
880880
DEALINGS IN THE SOFTWARE.
881+
882+
================================================================
883+
dashDotCurves.glslfx
884+
================================================================
885+
886+
GPU-accelerated Antialiased Dashed Stroked Polylines
887+
Copyright (C) 2013 Nicolas P. Rougier. All rights reserved.
888+
889+
Redistribution and use in source and binary forms, with or without
890+
modification, are permitted provided that the following conditions are met:
891+
892+
1. Redistributions of source code must retain the above copyright notice,
893+
this list of conditions and the following disclaimer.
894+
895+
2. Redistributions in binary form must reproduce the above copyright
896+
notice, this list of conditions and the following disclaimer in the
897+
documentation and/or other materials provided with the distribution.
898+
899+
THIS SOFTWARE IS PROVIDED BY NICOLAS P. ROUGIER ''AS IS'' AND ANY EXPRESS OR
900+
IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
901+
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
902+
EVENT SHALL NICOLAS P. ROUGIER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
903+
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
904+
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
905+
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
906+
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
907+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
908+
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
909+
910+
The views and conclusions contained in the software and documentation are
911+
those of the authors and should not be interpreted as representing official
912+
policies, either expressed or implied, of Nicolas P. Rougier.
913+
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
#usda 1.0
2+
3+
(
4+
upAxis = "Y"
5+
doc = """This layer represents the various geometric forms that curves
6+
may be used to represent."""
7+
)
8+
9+
def "MyPattern" (
10+
prepend apiSchemas = ["DashDotPatternAPI"]
11+
)
12+
{
13+
uniform float patternPeriod = 15
14+
uniform float2[] pattern = [(0, 10)]
15+
}
16+
17+
def Xform "Linear" {
18+
uniform token[] xformOpOrder = ["xformOp:translate"]
19+
float3 xformOp:translate = (0, 9, 0)
20+
def Scope "Ribbons"{
21+
def DashDotLines "StyledPolyline1" (
22+
inherits = [</MyPattern>]
23+
){
24+
uniform token[] xformOpOrder = ["xformOp:translate"]
25+
float3 xformOp:translate = (0, 0, 0)
26+
27+
uniform bool screenSpacePattern = false
28+
uniform token startCapType = "round"
29+
uniform token endCapType = "round"
30+
31+
int[] curveVertexCounts = [3, 4, 4]
32+
point3f[] points = [(0, 0, 0), (10, 10, 0), (10, 20, 0), (0, 30, 0), (-10, 40, 0), (-10, 50, 0), (0, 60, 0), (10, 70, 0), (10, 80, 0), (0, 90, 0), (-10, 100, 0)]
33+
float[] widths = [5] (interpolation = "constant")
34+
color3f[] primvars:displayColor = [(1, 0, 0)]
35+
}
36+
}
37+
}
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
#usda 1.0
2+
3+
(
4+
upAxis = "Y"
5+
doc = """This layer represents the various geometric forms that curves
6+
may be used to represent."""
7+
)
8+
9+
def "MyPattern" (
10+
prepend apiSchemas = ["DashDotPatternAPI"]
11+
)
12+
{
13+
uniform float patternPeriod = 15
14+
uniform float2[] pattern = [(0, 10)]
15+
}
16+
17+
def Xform "Linear" {
18+
uniform token[] xformOpOrder = ["xformOp:translate"]
19+
float3 xformOp:translate = (0, 9, 0)
20+
def Scope "Ribbons"{
21+
def DashDotLines "StyledPolyline1" (
22+
inherits = [</MyPattern>]
23+
){
24+
uniform token[] xformOpOrder = ["xformOp:translate"]
25+
float3 xformOp:translate = (0, 0, 0)
26+
27+
uniform token implType = "simpleDashDot"
28+
uniform bool screenSpacePattern = false
29+
uniform token startCapType = "round"
30+
uniform token endCapType = "round"
31+
32+
int[] curveVertexCounts = [3, 4, 4]
33+
point3f[] points = [(0, 0, 0), (10, 10, 0), (10, 20, 0), (0, 30, 0), (-10, 40, 0), (-10, 50, 0), (0, 60, 0), (10, 70, 0), (10, 80, 0), (0, 90, 0), (-10, 100, 0)]
34+
float[] widths = [1] (interpolation = "constant")
35+
color3f[] primvars:displayColor = [(1, 0, 0)]
36+
}
37+
}
38+
}
Lines changed: 165 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,165 @@
1+
#usda 1.0
2+
3+
(
4+
upAxis = "Y"
5+
doc = """This layer represents the various geometric forms that curves
6+
may be used to represent."""
7+
)
8+
9+
10+
def Xform "Linear" {
11+
uniform token[] xformOpOrder = ["xformOp:translate"]
12+
float3 xformOp:translate = (0, 9, 0)
13+
def Scope "Ribbons"{
14+
def DashDotLines "StyledPolyline1" (
15+
inherits = [</Pattern1>]
16+
){
17+
uniform token[] xformOpOrder = ["xformOp:translate"]
18+
float3 xformOp:translate = (0, 0, 0)
19+
20+
uniform bool screenSpacePattern = true
21+
uniform token startCapType = "round"
22+
uniform token endCapType = "round"
23+
uniform float patternScale = 2.5
24+
int[] curveVertexCounts = [7]
25+
point3f[] points = [(0, 0, 0), (10, 10, 0), (10, 20, 0), (0, 30, 0), (-10, 40, 0), (-10, 50, 0), (0, 60, 0)]
26+
float[] widths = [5] (interpolation = "constant")
27+
color3f[] primvars:displayColor = [(1, 0, 0)]
28+
}
29+
def DashDotLines "StyledPolyline2" (
30+
inherits = [</Pattern1>]
31+
){
32+
uniform token[] xformOpOrder = ["xformOp:translate"]
33+
float3 xformOp:translate = (30, 0, 0)
34+
35+
uniform bool screenSpacePattern = true
36+
uniform token startCapType = "square"
37+
uniform token endCapType = "triangle"
38+
uniform float patternScale = 3.5
39+
int[] curveVertexCounts = [7]
40+
point3f[] points = [(0, 0, 0), (10, 10, 0), (10, 20, 0), (0, 30, 0), (-10, 40, 0), (-10, 50, 0), (0, 60, 0)]
41+
float[] widths = [8] (interpolation = "constant")
42+
color3f[] primvars:displayColor = [(1, 0, 0)]
43+
}
44+
def DashDotLines "StyledPolyline3" (
45+
inherits = [</Pattern1>]
46+
){
47+
uniform token[] xformOpOrder = ["xformOp:translate"]
48+
float3 xformOp:translate = (60, 0, 0)
49+
50+
uniform bool screenSpacePattern = true
51+
uniform token startCapType = "round"
52+
uniform token endCapType = "triangle"
53+
uniform float patternScale = 5
54+
int[] curveVertexCounts = [7]
55+
point3f[] points = [(0, 0, 0), (10, 10, 0), (10, 20, 0), (0, 30, 0), (-10, 40, 0), (-10, 50, 0), (0, 60, 0)]
56+
float[] widths = [3] (interpolation = "constant")
57+
color3f[] primvars:displayColor = [(1, 0, 0)]
58+
}
59+
def DashDotLines "StyledPolyline4" (
60+
){
61+
uniform token[] xformOpOrder = ["xformOp:translate"]
62+
float3 xformOp:translate = (90, 0, 0)
63+
64+
uniform token startCapType = "round"
65+
uniform token endCapType = "round"
66+
int[] curveVertexCounts = [7]
67+
point3f[] points = [(0, 0, 0), (10, 10, 0), (10, 20, 0), (0, 30, 0), (-10, 40, 0), (-10, 50, 0), (0, 60, 0)]
68+
float[] widths = [8] (interpolation = "constant")
69+
color3f[] primvars:displayColor = [(1, 0, 0)]
70+
}
71+
72+
def DashDotLines "StyledPolyline5" (
73+
inherits = [</Pattern1>]
74+
){
75+
uniform token[] xformOpOrder = ["xformOp:translate"]
76+
float3 xformOp:translate = (0, -80, 0)
77+
78+
uniform bool screenSpacePattern = true
79+
uniform token startCapType = "round"
80+
uniform token endCapType = "round"
81+
uniform float patternScale = 2.5
82+
int[] curveVertexCounts = [7]
83+
point3f[] points = [(0, 0, 0), (10, 10, 0), (10, 20, 0), (0, 30, 0), (-10, 40, 0), (-10, 50, 0), (0, 60, 0)]
84+
float[] widths = [5] (interpolation = "constant")
85+
color3f[] primvars:displayColor = [(0, 1, 0)]
86+
}
87+
def DashDotLines "StyledPolyline6" (
88+
inherits = [</Pattern2>]
89+
){
90+
uniform token[] xformOpOrder = ["xformOp:translate"]
91+
float3 xformOp:translate = (30, -80, 0)
92+
93+
uniform bool screenSpacePattern = true
94+
uniform token startCapType = "round"
95+
uniform token endCapType = "round"
96+
uniform float patternScale = 2.5
97+
int[] curveVertexCounts = [7]
98+
point3f[] points = [(0, 0, 0), (10, 10, 0), (10, 20, 0), (0, 30, 0), (-10, 40, 0), (-10, 50, 0), (0, 60, 0)]
99+
float[] widths = [5] (interpolation = "constant")
100+
color3f[] primvars:displayColor = [(0, 1, 0)]
101+
}
102+
def DashDotLines "StyledPolyline7" (
103+
inherits = [</Pattern3>]
104+
){
105+
uniform token[] xformOpOrder = ["xformOp:translate"]
106+
float3 xformOp:translate = (60, -80, 0)
107+
108+
uniform bool screenSpacePattern = true
109+
uniform token startCapType = "round"
110+
uniform token endCapType = "round"
111+
uniform float patternScale = 5
112+
int[] curveVertexCounts = [7]
113+
point3f[] points = [(0, 0, 0), (10, 10, 0), (10, 20, 0), (0, 30, 0), (-10, 40, 0), (-10, 50, 0), (0, 60, 0)]
114+
float[] widths = [5] (interpolation = "constant")
115+
color3f[] primvars:displayColor = [(0, 1, 0)]
116+
}
117+
def DashDotLines "StyledPolyline8" (
118+
inherits = [</Pattern4>]
119+
){
120+
uniform token[] xformOpOrder = ["xformOp:translate"]
121+
float3 xformOp:translate = (90, -80, 0)
122+
123+
uniform bool screenSpacePattern = true
124+
uniform token startCapType = "round"
125+
uniform token endCapType = "round"
126+
uniform float patternScale = 5
127+
int[] curveVertexCounts = [7]
128+
point3f[] points = [(0, 0, 0), (10, 10, 0), (10, 20, 0), (0, 30, 0), (-10, 40, 0), (-10, 50, 0), (0, 60, 0)]
129+
float[] widths = [5] (interpolation = "constant")
130+
color3f[] primvars:displayColor = [(0, 1, 0)]
131+
}
132+
}
133+
}
134+
135+
def "Pattern1" (
136+
prepend apiSchemas = ["DashDotPatternAPI"]
137+
)
138+
{
139+
uniform float patternPeriod = 40
140+
uniform float2[] pattern = [(0, 25), (5, 5)]
141+
}
142+
143+
def "Pattern2" (
144+
prepend apiSchemas = ["DashDotPatternAPI"]
145+
)
146+
{
147+
uniform float patternPeriod = 20
148+
uniform float2[] pattern = [(0, 10), (5, 0)]
149+
}
150+
151+
def "Pattern3" (
152+
prepend apiSchemas = ["DashDotPatternAPI"]
153+
)
154+
{
155+
uniform float patternPeriod = 15
156+
uniform float2[] pattern = [(0, 10)]
157+
}
158+
159+
def "Pattern4" (
160+
prepend apiSchemas = ["DashDotPatternAPI"]
161+
)
162+
{
163+
uniform float patternPeriod = 5
164+
uniform float2[] pattern = [(0, 0)]
165+
}
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
#usda 1.0
2+
3+
(
4+
upAxis = "Y"
5+
doc = """This layer represents the various geometric forms that curves
6+
may be used to represent."""
7+
)
8+
9+
def "MyPattern" (
10+
prepend apiSchemas = ["DashDotPatternAPI"]
11+
)
12+
{
13+
uniform float patternPeriod = 15
14+
uniform float2[] pattern = [(0, 10)]
15+
}
16+
17+
def Xform "Linear" {
18+
uniform token[] xformOpOrder = ["xformOp:translate"]
19+
float3 xformOp:translate = (0, 9, 0)
20+
def Scope "Ribbons"{
21+
def DashDotLines "StyledPolyline1" (
22+
prepend inherits = [</MyPattern>]
23+
){
24+
uniform token[] xformOpOrder = ["xformOp:translate"]
25+
float3 xformOp:translate = (0, 0, 0)
26+
27+
uniform bool screenSpacePattern = true
28+
uniform token startCapType = "round"
29+
uniform token endCapType = "round"
30+
uniform float patternScale = 5
31+
32+
int[] curveVertexCounts = [3, 4, 4]
33+
point3f[] points = [(0, 0, 0), (10, 10, 0), (10, 20, 0), (0, 30, 0), (-10, 40, 0), (-10, 50, 0), (0, 60, 0), (10, 70, 0), (10, 80, 0), (0, 90, 0), (-10, 100, 0)]
34+
float[] widths = [5] (interpolation = "constant")
35+
color3f[] primvars:displayColor = [(1, 0, 0)]
36+
}
37+
}
38+
}
39+
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
#usda 1.0
2+
3+
(
4+
upAxis = "Y"
5+
doc = """This layer represents the various geometric forms that curves
6+
may be used to represent."""
7+
)
8+
9+
def "MyPattern" (
10+
prepend apiSchemas = ["DashDotPatternAPI"]
11+
)
12+
{
13+
uniform float patternPeriod = 15
14+
uniform float2[] pattern = [(0, 10)]
15+
}
16+
17+
def Xform "Linear" {
18+
uniform token[] xformOpOrder = ["xformOp:translate"]
19+
float3 xformOp:translate = (0, 9, 0)
20+
def Scope "Ribbons"{
21+
def DashDotLines "StyledPolyline1" (
22+
inherits = [</MyPattern>]
23+
){
24+
uniform token[] xformOpOrder = ["xformOp:translate"]
25+
float3 xformOp:translate = (0, 0, 0)
26+
27+
uniform bool screenSpacePattern = true
28+
uniform token startCapType = "round"
29+
uniform token endCapType = "round"
30+
uniform float patternScale = 5
31+
32+
int[] curveVertexCounts = [3, 4, 4]
33+
point3f[] points = [(0, 0, 0), (10, 10, 0), (10, 20, 0), (0, 30, 0), (-10, 40, 0), (-10, 50, 0), (0, 60, 0), (10, 70, 0), (10, 80, 0), (0, 90, 0), (-10, 100, 0)]
34+
float[] widths = [5] (interpolation = "constant")
35+
color3f[] primvars:displayColor = [(1, 0, 0), (1, 0, 0), (0, 0, 1), (1, 1, 0), (1, 0 ,1), (0, 1, 1), (0, 1, 0), (0, 0, 1), (1, 1, 0), (1, 0 ,1), (0, 1, 1)](interpolation = "vertex")
36+
}
37+
}
38+
}

0 commit comments

Comments
 (0)