Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
openstructure
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container registry
Model registry
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
schwede
openstructure
Commits
5e4830a3
Commit
5e4830a3
authored
13 years ago
by
Ansgar Philippsen
Browse files
Options
Downloads
Patches
Plain Diff
fixed primlist python args from col/rad to color/radius for better readability
parent
42d2bc6a
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
modules/gfx/pymod/__init__.py
+31
-31
31 additions, 31 deletions
modules/gfx/pymod/__init__.py
with
31 additions
and
31 deletions
modules/gfx/pymod/__init__.py
+
31
−
31
View file @
5e4830a3
...
@@ -196,45 +196,45 @@ def _to_vec3(p):
...
@@ -196,45 +196,45 @@ def _to_vec3(p):
raise
TypeError
(
"
expected either a sequence or a geom.Vec3 object
"
)
raise
TypeError
(
"
expected either a sequence or a geom.Vec3 object
"
)
def
_primlist_add_point
(
self
,
pos
,
col
=
None
):
def
_primlist_add_point
(
self
,
pos
,
col
or
=
None
):
pos
=
_to_vec3
(
pos
)
pos
=
_to_vec3
(
pos
)
if
not
col
:
if
not
col
or
:
col
=
WHITE
col
or
=
WHITE
self
.
_add_point
(
pos
,
col
)
self
.
_add_point
(
pos
,
col
or
)
def
_primlist_add_line
(
self
,
pos1
,
pos2
,
col
=
None
,
col1
=
None
,
col2
=
None
):
def
_primlist_add_line
(
self
,
pos1
,
pos2
,
col
or
=
None
,
col
or
1
=
None
,
col
or
2
=
None
):
pos1
=
_to_vec3
(
pos1
)
pos1
=
_to_vec3
(
pos1
)
pos2
=
_to_vec3
(
pos2
)
pos2
=
_to_vec3
(
pos2
)
if
not
col
:
if
not
col
or
:
col
=
WHITE
col
or
=
WHITE
if
not
col1
:
if
not
col
or
1
:
col1
=
col
col
or
1
=
col
or
if
not
col2
:
if
not
col
or
2
:
col2
=
col
col
or
2
=
col
or
self
.
_add_line
(
pos1
,
pos2
,
col1
,
col2
)
self
.
_add_line
(
pos1
,
pos2
,
col
or
1
,
col
or
2
)
def
_primlist_add_sphere
(
self
,
cen
,
rad
=
1.0
,
col
=
None
):
def
_primlist_add_sphere
(
self
,
cen
,
rad
ius
=
1.0
,
col
or
=
None
):
pos
=
_to_vec3
(
cen
)
pos
=
_to_vec3
(
cen
)
if
not
col
:
if
not
col
or
:
col
=
WHITE
col
or
=
WHITE
self
.
_add_sphere
(
pos
,
rad
,
col
)
self
.
_add_sphere
(
pos
,
rad
ius
,
col
or
)
def
_primlist_add_cyl
(
self
,
pos1
,
pos2
,
rad
=
None
,
rad1
=
None
,
rad2
=
None
,
col
=
None
,
col1
=
None
,
col2
=
None
):
def
_primlist_add_cyl
(
self
,
pos1
,
pos2
,
rad
ius
=
None
,
rad
ius
1
=
None
,
rad
ius
2
=
None
,
col
or
=
None
,
col
or
1
=
None
,
col
or
2
=
None
):
pos1
=
_to_vec3
(
pos1
)
pos1
=
_to_vec3
(
pos1
)
pos2
=
_to_vec3
(
pos2
)
pos2
=
_to_vec3
(
pos2
)
if
rad
is
None
:
if
rad
ius
is
None
:
rad
=
1.0
rad
ius
=
1.0
if
rad1
is
None
:
if
rad
ius
1
is
None
:
rad1
=
rad
rad
ius
1
=
rad
ius
if
rad2
is
None
:
if
rad
ius
2
is
None
:
rad2
=
rad
rad
ius
2
=
rad
ius
if
not
col
:
if
not
col
or
:
col
=
WHITE
col
or
=
WHITE
if
not
col1
:
if
not
col
or
1
:
col1
=
col
col
or
1
=
col
or
if
not
col2
:
if
not
col
or
2
:
col2
=
col
col
or
2
=
col
or
self
.
_add_cyl
(
pos1
,
pos2
,
rad1
,
rad2
,
col1
,
col2
)
self
.
_add_cyl
(
pos1
,
pos2
,
rad
ius
1
,
rad
ius
2
,
col
or
1
,
col
or
2
)
PrimList
.
AddPoint
=
_primlist_add_point
PrimList
.
AddPoint
=
_primlist_add_point
PrimList
.
AddLine
=
_primlist_add_line
PrimList
.
AddLine
=
_primlist_add_line
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment