EggPrimitive
from panda3d.egg import EggPrimitive
- class EggPrimitive
Bases:
EggNode
,EggAttributes
,EggRenderMode
A base class for any of a number of kinds of geometry primitives: polygons, point lights, nurbs patches, parametrics curves, etc. Things with a set of vertices and some rendering properties like color.
An EggPrimitive is an STL-style container of pointers to EggVertex’s. In fact, it IS a vector, and can be manipulated in all the ways that vectors can. However, it is necessary that all vertices belong to the same vertex pool.
Inheritance diagram
- SOverall = 1
- SPerFace = 2
- SPerVertex = 3
- SUnknown = 0
- S_overall = 1
- S_per_face = 2
- S_per_vertex = 3
- S_unknown = 0
- __init__(*args, **kwargs)
- addTexture()
C++ Interface: add_texture(const EggPrimitive self, EggTexture texture)
- /**
Applies the indicated texture to the primitive.
Note that, in the case of multiple textures being applied to a single
primitive, the order in which the textures are applied does not affect the
rendering order; use EggTexture::set_sort() to specify that.
*/
- addVertex()
C++ Interface: add_vertex(const EggPrimitive self, EggVertex vertex)
- /**
Adds the indicated vertex to the end of the primitive’s list of vertices,
and returns it.
*/
- add_texture()
C++ Interface: add_texture(const EggPrimitive self, EggTexture texture)
- /**
Applies the indicated texture to the primitive.
Note that, in the case of multiple textures being applied to a single
primitive, the order in which the textures are applied does not affect the
rendering order; use EggTexture::set_sort() to specify that.
*/
- add_vertex()
C++ Interface: add_vertex(const EggPrimitive self, EggVertex vertex)
- /**
Adds the indicated vertex to the end of the primitive’s list of vertices,
and returns it.
*/
- applyFirstAttribute()
C++ Interface: apply_first_attribute(const EggPrimitive self)
- /**
Sets the first vertex of the triangle (or each component) to the primitive
normal and/or color, if the primitive is flat-shaded. This reflects the
DirectX convention of storing flat-shaded properties on the first vertex,
although it is not usually a convention in Egg.
This may introduce redundant vertices to the vertex pool.
*/
- applyLastAttribute()
C++ Interface: apply_last_attribute(const EggPrimitive self)
- /**
Sets the last vertex of the triangle (or each component) to the primitive
normal and/or color, if the primitive is flat-shaded. This reflects the
OpenGL convention of storing flat-shaded properties on the last vertex,
although it is not usually a convention in Egg.
This may introduce redundant vertices to the vertex pool.
*/
- apply_first_attribute()
C++ Interface: apply_first_attribute(const EggPrimitive self)
- /**
Sets the first vertex of the triangle (or each component) to the primitive
normal and/or color, if the primitive is flat-shaded. This reflects the
DirectX convention of storing flat-shaded properties on the first vertex,
although it is not usually a convention in Egg.
This may introduce redundant vertices to the vertex pool.
*/
- apply_last_attribute()
C++ Interface: apply_last_attribute(const EggPrimitive self)
- /**
Sets the last vertex of the triangle (or each component) to the primitive
normal and/or color, if the primitive is flat-shaded. This reflects the
OpenGL convention of storing flat-shaded properties on the last vertex,
although it is not usually a convention in Egg.
This may introduce redundant vertices to the vertex pool.
*/
- bface_flag
- cleanup()
C++ Interface: cleanup(const EggPrimitive self)
- /**
Cleans up modeling errors in whatever context this makes sense. For
instance, for a polygon, this calls remove_doubled_verts(true). For a
point, it calls remove_nonunique_verts(). Returns true if the primitive is
valid, or false if it is degenerate.
*/
- clear()
C++ Interface: clear(const EggPrimitive self)
- /**
Removes all of the vertices from the primitive.
*/
- clearConnectedShading()
C++ Interface: clear_connected_shading(const EggPrimitive self)
- /**
Resets the connected_shading member in this primitive, so that
get_connected_shading() will recompute a new value.
*/
- clearMaterial()
C++ Interface: clear_material(const EggPrimitive self)
- /**
Removes any material from the primitive.
*/
- clearTexture()
C++ Interface: clear_texture(const EggPrimitive self)
- /**
Removes any texturing from the primitive.
*/
- clear_connected_shading()
C++ Interface: clear_connected_shading(const EggPrimitive self)
- /**
Resets the connected_shading member in this primitive, so that
get_connected_shading() will recompute a new value.
*/
- clear_material()
C++ Interface: clear_material(const EggPrimitive self)
- /**
Removes any material from the primitive.
*/
- clear_texture()
C++ Interface: clear_texture(const EggPrimitive self)
- /**
Removes any texturing from the primitive.
*/
- connected_shading
- copyAttributes()
C++ Interface: copy_attributes(const EggPrimitive self, const EggPrimitive other) copy_attributes(const EggPrimitive self, const EggAttributes other)
- copyVertices()
C++ Interface: copy_vertices(const EggPrimitive self, const EggPrimitive other)
- /**
Replaces the current primitive’s list of vertices with a copy of the list
of vertices on the other primitive.
*/
- copy_attributes()
C++ Interface: copy_attributes(const EggPrimitive self, const EggPrimitive other) copy_attributes(const EggPrimitive self, const EggAttributes other)
- copy_vertices()
C++ Interface: copy_vertices(const EggPrimitive self, const EggPrimitive other)
- /**
Replaces the current primitive’s list of vertices with a copy of the list
of vertices on the other primitive.
*/
- determineAlphaMode()
C++ Interface: determine_alpha_mode(const EggPrimitive self)
- /**
Walks back up the hierarchy, looking for an EggGroup or EggPrimitive or
some such object at this level or above this primitive that has an
alpha_mode other than AM_unspecified. Returns a valid EggRenderMode
pointer if one is found, or NULL otherwise.
*/
- determineBin()
C++ Interface: determine_bin(const EggPrimitive self)
- /**
Walks back up the hierarchy, looking for an EggGroup or EggPrimitive or
some such object at this level or above this primitive that has a bin
specified. Returns a valid EggRenderMode pointer if one is found, or NULL
otherwise.
*/
- determineDepthOffset()
C++ Interface: determine_depth_offset(const EggPrimitive self)
- /**
Walks back up the hierarchy, looking for an EggGroup or EggPrimitive or
some such object at this level or above this primitive that has a
depth_offset specified. Returns a valid EggRenderMode pointer if one is
found, or NULL otherwise.
*/
- determineDepthTestMode()
C++ Interface: determine_depth_test_mode(const EggPrimitive self)
- /**
Walks back up the hierarchy, looking for an EggGroup or EggPrimitive or
some such object at this level or above this node that has a
depth_test_mode other than DTM_unspecified. Returns a valid EggRenderMode
pointer if one is found, or NULL otherwise.
*/
- determineDepthWriteMode()
C++ Interface: determine_depth_write_mode(const EggPrimitive self)
- /**
Walks back up the hierarchy, looking for an EggGroup or EggPrimitive or
some such object at this level or above this node that has a
depth_write_mode other than DWM_unspecified. Returns a valid EggRenderMode
pointer if one is found, or NULL otherwise.
*/
- determineDrawOrder()
C++ Interface: determine_draw_order(const EggPrimitive self)
- /**
Walks back up the hierarchy, looking for an EggGroup or EggPrimitive or
some such object at this level or above this primitive that has a
draw_order specified. Returns a valid EggRenderMode pointer if one is
found, or NULL otherwise.
*/
- determineVisibilityMode()
C++ Interface: determine_visibility_mode(const EggPrimitive self)
- /**
Walks back up the hierarchy, looking for an EggGroup or EggPrimitive or
some such object at this level or above this node that has a
visibility_mode other than VM_unspecified. Returns a valid EggRenderMode
pointer if one is found, or NULL otherwise.
*/
- determine_alpha_mode()
C++ Interface: determine_alpha_mode(const EggPrimitive self)
- /**
Walks back up the hierarchy, looking for an EggGroup or EggPrimitive or
some such object at this level or above this primitive that has an
alpha_mode other than AM_unspecified. Returns a valid EggRenderMode
pointer if one is found, or NULL otherwise.
*/
- determine_bin()
C++ Interface: determine_bin(const EggPrimitive self)
- /**
Walks back up the hierarchy, looking for an EggGroup or EggPrimitive or
some such object at this level or above this primitive that has a bin
specified. Returns a valid EggRenderMode pointer if one is found, or NULL
otherwise.
*/
- determine_depth_offset()
C++ Interface: determine_depth_offset(const EggPrimitive self)
- /**
Walks back up the hierarchy, looking for an EggGroup or EggPrimitive or
some such object at this level or above this primitive that has a
depth_offset specified. Returns a valid EggRenderMode pointer if one is
found, or NULL otherwise.
*/
- determine_depth_test_mode()
C++ Interface: determine_depth_test_mode(const EggPrimitive self)
- /**
Walks back up the hierarchy, looking for an EggGroup or EggPrimitive or
some such object at this level or above this node that has a
depth_test_mode other than DTM_unspecified. Returns a valid EggRenderMode
pointer if one is found, or NULL otherwise.
*/
- determine_depth_write_mode()
C++ Interface: determine_depth_write_mode(const EggPrimitive self)
- /**
Walks back up the hierarchy, looking for an EggGroup or EggPrimitive or
some such object at this level or above this node that has a
depth_write_mode other than DWM_unspecified. Returns a valid EggRenderMode
pointer if one is found, or NULL otherwise.
*/
- determine_draw_order()
C++ Interface: determine_draw_order(const EggPrimitive self)
- /**
Walks back up the hierarchy, looking for an EggGroup or EggPrimitive or
some such object at this level or above this primitive that has a
draw_order specified. Returns a valid EggRenderMode pointer if one is
found, or NULL otherwise.
*/
- determine_visibility_mode()
C++ Interface: determine_visibility_mode(const EggPrimitive self)
- /**
Walks back up the hierarchy, looking for an EggGroup or EggPrimitive or
some such object at this level or above this node that has a
visibility_mode other than VM_unspecified. Returns a valid EggRenderMode
pointer if one is found, or NULL otherwise.
*/
- getBfaceFlag()
C++ Interface: get_bface_flag(EggPrimitive self)
- /**
Retrieves the backfacing flag of the polygon. See set_bface_flag().
*/
- getClassType()
C++ Interface: get_class_type()
- getConnectedShading()
C++ Interface: get_connected_shading(EggPrimitive self)
- /**
Determines what sort of shading properties this primitive’s connected
neighbors have.
To get the most accurate results, you should first call
clear_connected_shading() on all connected primitives (or on all primitives
in the egg file). It might also be a good idea to call
remove_unused_vertices() to ensure proper connectivity.
You may find it easiest to call these other methods on the EggData root
node (they are defined on EggGroupNode).
*/
- getMaterial()
C++ Interface: get_material(EggPrimitive self)
- /**
Returns a pointer to the applied material, or NULL if there is no material
applied.
*/
- getNumTextures()
C++ Interface: get_num_textures(EggPrimitive self)
- /**
Returns the number of textures applied to the primitive.
*/
- getNumVertices()
C++ Interface: get_num_vertices(EggPrimitive self)
// These are shorthands if you don’t want to use the iterators.
// These are shorthands if you don’t want to use the iterators.
// These are shorthands if you don’t want to use the iterators.
- /**
*/
- getPool()
C++ Interface: get_pool(EggPrimitive self)
- /**
Returns the vertex pool associated with the vertices of the primitive, or
NULL if the primitive has no vertices.
*/
- getShading()
C++ Interface: get_shading(EggPrimitive self)
- /**
Returns the shading properties apparent on this particular primitive. This
returns S_per_vertex if the vertices have colors or normals (and they are
not all the same values), or for a simple primitive, S_overall otherwise.
A composite primitive may also return S_per_face if the individual
component primitives have colors or normals that are not all the same
values.
To get the most accurate results, you should call clear_shading() on all
connected primitives (or on all primitives in the egg file), followed by
get_shading() on each primitive. You may find it easiest to call these
methods on the EggData root node (they are defined on EggGroupNode).
*/
- getSortName()
C++ Interface: get_sort_name(EggPrimitive self)
- /**
Returns the name of the primitive for the purposes of sorting primitives
into different groups, if there is one.
Presently, this is defined as the primitive name itself, unless it begins
with a digit.
*/
- getTexture()
C++ Interface: get_texture(EggPrimitive self) get_texture(EggPrimitive self, int n)
- /**
Returns the first texture on the primitive, if any, or NULL if there are no
textures on the primitive.
@deprecated This method is used in support of single-texturing only.
New code should be written to use the multitexture variants instead.
*/
- /**
Returns the nth texture that has been applied to the primitive.
*/
- getTextures()
- getVertex()
C++ Interface: get_vertex(EggPrimitive self, int index)
- /**
Returns a particular index based on its index number.
*/
- getVertices()
- get_bface_flag()
C++ Interface: get_bface_flag(EggPrimitive self)
- /**
Retrieves the backfacing flag of the polygon. See set_bface_flag().
*/
- get_class_type()
C++ Interface: get_class_type()
- get_connected_shading()
C++ Interface: get_connected_shading(EggPrimitive self)
- /**
Determines what sort of shading properties this primitive’s connected
neighbors have.
To get the most accurate results, you should first call
clear_connected_shading() on all connected primitives (or on all primitives
in the egg file). It might also be a good idea to call
remove_unused_vertices() to ensure proper connectivity.
You may find it easiest to call these other methods on the EggData root
node (they are defined on EggGroupNode).
*/
- get_material()
C++ Interface: get_material(EggPrimitive self)
- /**
Returns a pointer to the applied material, or NULL if there is no material
applied.
*/
- get_num_textures()
C++ Interface: get_num_textures(EggPrimitive self)
- /**
Returns the number of textures applied to the primitive.
*/
- get_num_vertices()
C++ Interface: get_num_vertices(EggPrimitive self)
// These are shorthands if you don’t want to use the iterators.
// These are shorthands if you don’t want to use the iterators.
// These are shorthands if you don’t want to use the iterators.
- /**
*/
- get_pool()
C++ Interface: get_pool(EggPrimitive self)
- /**
Returns the vertex pool associated with the vertices of the primitive, or
NULL if the primitive has no vertices.
*/
- get_shading()
C++ Interface: get_shading(EggPrimitive self)
- /**
Returns the shading properties apparent on this particular primitive. This
returns S_per_vertex if the vertices have colors or normals (and they are
not all the same values), or for a simple primitive, S_overall otherwise.
A composite primitive may also return S_per_face if the individual
component primitives have colors or normals that are not all the same
values.
To get the most accurate results, you should call clear_shading() on all
connected primitives (or on all primitives in the egg file), followed by
get_shading() on each primitive. You may find it easiest to call these
methods on the EggData root node (they are defined on EggGroupNode).
*/
- get_sort_name()
C++ Interface: get_sort_name(EggPrimitive self)
- /**
Returns the name of the primitive for the purposes of sorting primitives
into different groups, if there is one.
Presently, this is defined as the primitive name itself, unless it begins
with a digit.
*/
- get_texture()
C++ Interface: get_texture(EggPrimitive self) get_texture(EggPrimitive self, int n)
- /**
Returns the first texture on the primitive, if any, or NULL if there are no
textures on the primitive.
@deprecated This method is used in support of single-texturing only.
New code should be written to use the multitexture variants instead.
*/
- /**
Returns the nth texture that has been applied to the primitive.
*/
- get_textures()
- get_vertex()
C++ Interface: get_vertex(EggPrimitive self, int index)
- /**
Returns a particular index based on its index number.
*/
- get_vertices()
- hasMaterial()
C++ Interface: has_material(EggPrimitive self)
- /**
Returns true if the primitive is materiald (and get_material() will return
a real pointer), false otherwise (and get_material() will return NULL).
*/
- hasNormals()
C++ Interface: has_normals(EggPrimitive self)
- /**
Returns true if any of the primitives (e.g. polygons) defined within this
group or below have either face or vertex normals defined, false otherwise.
*/
- hasPrimitives()
C++ Interface: has_primitives(EggPrimitive self)
- /**
Returns true if there are any primitives (e.g. polygons) defined within
this group or below, false otherwise.
*/
- hasTexture()
C++ Interface: has_texture(EggPrimitive self) has_texture(EggPrimitive self, EggTexture texture)
- /**
Returns true if the primitive has any textures specified, false otherwise.
@deprecated This method is used in support of single-texturing only.
New code should be written to use the multitexture variants instead.
*/
- /**
Returns true if the primitive has the particular indicated texture, false
otherwise.
*/
- hasVertexColor()
C++ Interface: has_vertex_color(EggPrimitive self)
- /**
Returns true if any vertex on the primitive has a specific color set, false
otherwise.
If you call unify_attributes() first, this will also return false even if
all the vertices were set to the same value (since unify_attributes()
removes redundant vertex properties).
*/
- hasVertexNormal()
C++ Interface: has_vertex_normal(EggPrimitive self)
- /**
Returns true if any vertex on the primitive has a specific normal set,
false otherwise.
If you call unify_attributes() first, this will also return false even if
all the vertices were set to the same value (since unify_attributes()
removes redundant vertex properties).
*/
- has_material()
C++ Interface: has_material(EggPrimitive self)
- /**
Returns true if the primitive is materiald (and get_material() will return
a real pointer), false otherwise (and get_material() will return NULL).
*/
- has_normals()
C++ Interface: has_normals(EggPrimitive self)
- /**
Returns true if any of the primitives (e.g. polygons) defined within this
group or below have either face or vertex normals defined, false otherwise.
*/
- has_primitives()
C++ Interface: has_primitives(EggPrimitive self)
- /**
Returns true if there are any primitives (e.g. polygons) defined within
this group or below, false otherwise.
*/
- has_texture()
C++ Interface: has_texture(EggPrimitive self) has_texture(EggPrimitive self, EggTexture texture)
- /**
Returns true if the primitive has any textures specified, false otherwise.
@deprecated This method is used in support of single-texturing only.
New code should be written to use the multitexture variants instead.
*/
- /**
Returns true if the primitive has the particular indicated texture, false
otherwise.
*/
- has_vertex_color()
C++ Interface: has_vertex_color(EggPrimitive self)
- /**
Returns true if any vertex on the primitive has a specific color set, false
otherwise.
If you call unify_attributes() first, this will also return false even if
all the vertices were set to the same value (since unify_attributes()
removes redundant vertex properties).
*/
- has_vertex_normal()
C++ Interface: has_vertex_normal(EggPrimitive self)
- /**
Returns true if any vertex on the primitive has a specific normal set,
false otherwise.
If you call unify_attributes() first, this will also return false even if
all the vertices were set to the same value (since unify_attributes()
removes redundant vertex properties).
*/
- insertVertex()
C++ Interface: insert_vertex(const EggPrimitive self, int index, EggVertex vertex)
- /**
Inserts a vertex at the given position.
*/
- insert_vertex()
C++ Interface: insert_vertex(const EggPrimitive self, int index, EggVertex vertex)
- /**
Inserts a vertex at the given position.
*/
- jointHasPrimitives()
C++ Interface: joint_has_primitives(EggPrimitive self)
- /**
Returns true if there are any primitives (e.g. polygons) defined within
this group or below, but the search does not include nested joints.
*/
- joint_has_primitives()
C++ Interface: joint_has_primitives(EggPrimitive self)
- /**
Returns true if there are any primitives (e.g. polygons) defined within
this group or below, but the search does not include nested joints.
*/
- makeCopy()
C++ Interface: make_copy(EggPrimitive self)
- make_copy()
C++ Interface: make_copy(EggPrimitive self)
- material
- pool
- postApplyFlatAttribute()
C++ Interface: post_apply_flat_attribute(const EggPrimitive self)
- /**
Intended as a followup to apply_last_attribute(), this also sets an
attribute on the first vertices of the primitive, if they don’t already
have an attribute set, just so they end up with something.
*/
- post_apply_flat_attribute()
C++ Interface: post_apply_flat_attribute(const EggPrimitive self)
- /**
Intended as a followup to apply_last_attribute(), this also sets an
attribute on the first vertices of the primitive, if they don’t already
have an attribute set, just so they end up with something.
*/
- removeDoubledVerts()
C++ Interface: remove_doubled_verts(const EggPrimitive self, bool closed)
- /**
Certain kinds of primitives, particularly polygons, don’t like to have the
same vertex repeated consecutively. Unfortunately, some modeling programs
(like MultiGen) make this an easy mistake to make.
It’s handy to have a function to remove these redundant vertices. If
closed is true, it also checks that the first and last vertices are not the
same.
This function identifies repeated vertices by position only; it does not
consider any other properties, such as color or UV, significant in
differentiating vertices.
*/
- removeNonuniqueVerts()
C++ Interface: remove_nonunique_verts(const EggPrimitive self)
- /**
Removes any multiple appearances of the same vertex from the primitive.
This primarily makes sense for a point primitive, which is really a
collection of points and which doesn’t make sense to include the same point
twice, in any order.
*/
- removeVertex()
C++ Interface: remove_vertex(const EggPrimitive self, EggVertex vertex) remove_vertex(const EggPrimitive self, int index)
- remove_doubled_verts()
C++ Interface: remove_doubled_verts(const EggPrimitive self, bool closed)
- /**
Certain kinds of primitives, particularly polygons, don’t like to have the
same vertex repeated consecutively. Unfortunately, some modeling programs
(like MultiGen) make this an easy mistake to make.
It’s handy to have a function to remove these redundant vertices. If
closed is true, it also checks that the first and last vertices are not the
same.
This function identifies repeated vertices by position only; it does not
consider any other properties, such as color or UV, significant in
differentiating vertices.
*/
- remove_nonunique_verts()
C++ Interface: remove_nonunique_verts(const EggPrimitive self)
- /**
Removes any multiple appearances of the same vertex from the primitive.
This primarily makes sense for a point primitive, which is really a
collection of points and which doesn’t make sense to include the same point
twice, in any order.
*/
- remove_vertex()
C++ Interface: remove_vertex(const EggPrimitive self, EggVertex vertex) remove_vertex(const EggPrimitive self, int index)
- reverseVertexOrdering()
C++ Interface: reverse_vertex_ordering(const EggPrimitive self)
- /**
Reverses the ordering of the vertices in this primitive, if appropriate, in
order to change the direction the polygon appears to be facing. Does not
adjust the surface normal, if any.
*/
- reverse_vertex_ordering()
C++ Interface: reverse_vertex_ordering(const EggPrimitive self)
- /**
Reverses the ordering of the vertices in this primitive, if appropriate, in
order to change the direction the polygon appears to be facing. Does not
adjust the surface normal, if any.
*/
- setBfaceFlag()
C++ Interface: set_bface_flag(const EggPrimitive self, bool flag)
- /**
Sets the backfacing flag of the polygon. If this is true, the polygon will
be rendered so that both faces are visible; if it is false, only the front
face of the polygon will be visible.
*/
- setMaterial()
C++ Interface: set_material(const EggPrimitive self, EggMaterial material)
- /**
Applies the indicated material to the primitive.
*/
- setTexture()
C++ Interface: set_texture(const EggPrimitive self, EggTexture texture)
- /**
Replaces the current list of textures with the indicated texture.
@deprecated This method is used in support of single-texturing only.
Please use the multitexture variant add_texture instead.
*/
- setVertex()
C++ Interface: set_vertex(const EggPrimitive self, int index, EggVertex vertex)
- /**
Replaces a particular vertex based on its index number in the list of
vertices. This is just a convenience function for people who don’t want to
mess with the iterators.
*/
- set_bface_flag()
C++ Interface: set_bface_flag(const EggPrimitive self, bool flag)
- /**
Sets the backfacing flag of the polygon. If this is true, the polygon will
be rendered so that both faces are visible; if it is false, only the front
face of the polygon will be visible.
*/
- set_material()
C++ Interface: set_material(const EggPrimitive self, EggMaterial material)
- /**
Applies the indicated material to the primitive.
*/
- set_texture()
C++ Interface: set_texture(const EggPrimitive self, EggTexture texture)
- /**
Replaces the current list of textures with the indicated texture.
@deprecated This method is used in support of single-texturing only.
Please use the multitexture variant add_texture instead.
*/
- set_vertex()
C++ Interface: set_vertex(const EggPrimitive self, int index, EggVertex vertex)
- /**
Replaces a particular vertex based on its index number in the list of
vertices. This is just a convenience function for people who don’t want to
mess with the iterators.
*/
- shading
- sort_name
- testVrefIntegrity()
C++ Interface: test_vref_integrity(EggPrimitive self)
- test_vref_integrity()
C++ Interface: test_vref_integrity(EggPrimitive self)
- textures
- unifyAttributes()
C++ Interface: unify_attributes(const EggPrimitive self, int shading)
- /**
If the shading property is S_per_vertex, ensures that all vertices have a
normal and a color, and the overall primitive does not.
If the shading property is S_per_face, and this is a composite primitive,
ensures that all components have a normal and a color, and the vertices and
overall primitive do not. (If this is a simple primitive, S_per_face works
the same as S_overall, below).
If the shading property is S_overall, ensures that no vertices or
components have a normal or a color, and the overall primitive does (if any
exists at all).
After this call, either the primitive will have normals or its vertices
will, but not both. Ditto for colors.
This may create redundant vertices in the vertex pool.
*/
- unify_attributes()
C++ Interface: unify_attributes(const EggPrimitive self, int shading)
- /**
If the shading property is S_per_vertex, ensures that all vertices have a
normal and a color, and the overall primitive does not.
If the shading property is S_per_face, and this is a composite primitive,
ensures that all components have a normal and a color, and the vertices and
overall primitive do not. (If this is a simple primitive, S_per_face works
the same as S_overall, below).
If the shading property is S_overall, ensures that no vertices or
components have a normal or a color, and the overall primitive does (if any
exists at all).
After this call, either the primitive will have normals or its vertices
will, but not both. Ditto for colors.
This may create redundant vertices in the vertex pool.
*/
- upcastToEggAttributes()
C++ Interface: upcast_to_EggAttributes(const EggPrimitive self)
upcast from EggPrimitive to EggAttributes
- upcastToEggNode()
C++ Interface: upcast_to_EggNode(const EggPrimitive self)
upcast from EggPrimitive to EggNode
- upcastToEggRenderMode()
C++ Interface: upcast_to_EggRenderMode(const EggPrimitive self)
upcast from EggPrimitive to EggRenderMode
- upcast_to_EggAttributes()
C++ Interface: upcast_to_EggAttributes(const EggPrimitive self)
upcast from EggPrimitive to EggAttributes
- upcast_to_EggNode()
C++ Interface: upcast_to_EggNode(const EggPrimitive self)
upcast from EggPrimitive to EggNode
- upcast_to_EggRenderMode()
C++ Interface: upcast_to_EggRenderMode(const EggPrimitive self)
upcast from EggPrimitive to EggRenderMode
- vertices
- write()
C++ Interface: write(EggPrimitive self, ostream out, int indent_level)