EggVertex
from panda3d.egg import EggVertex
- class EggVertex
Bases:
EggObject
,EggAttributes
Any one-, two-, three-, or four-component vertex, possibly with attributes such as a normal.
Inheritance diagram
- __init__(*args, **kwargs)
- assign()
C++ Interface: assign(const EggVertex self, const EggVertex copy)
- /**
Copies all properties of the vertex except its vertex pool, index number,
and group membership.
*/
- clearAux()
C++ Interface: clear_aux(const EggVertex self) clear_aux(const EggVertex self, str name)
- clearGrefs()
C++ Interface: clear_grefs(const EggVertex self)
- /**
Removes all group references from the vertex, so that it is not assigned to
any group.
*/
- clearUv()
C++ Interface: clear_uv(const EggVertex self) clear_uv(const EggVertex self, str name)
- clear_aux()
C++ Interface: clear_aux(const EggVertex self) clear_aux(const EggVertex self, str name)
- clear_grefs()
C++ Interface: clear_grefs(const EggVertex self)
- /**
Removes all group references from the vertex, so that it is not assigned to
any group.
*/
- clear_uv()
C++ Interface: clear_uv(const EggVertex self) clear_uv(const EggVertex self, str name)
- compareTo()
C++ Interface: compare_to(EggVertex self, const EggVertex other)
- /**
An ordering operator to compare two vertices for sorting order. This
imposes an arbitrary ordering useful to identify unique vertices.
Group membership is not considered in this comparison. This is somewhat
problematic, but cannot easily be helped, because considering group
membership would make it difficult to add and remove groups from vertices.
It also makes it impossible to meaningfully compare with a concrete
EggVertex object (which cannot have group memberships).
However, this is not altogether bad, because two vertices that are
identical in all other properties should generally also be identical in
group memberships, else the vertices will tend to fly apart when the joints
animate.
*/
- compare_to()
C++ Interface: compare_to(EggVertex self, const EggVertex other)
- /**
An ordering operator to compare two vertices for sorting order. This
imposes an arbitrary ordering useful to identify unique vertices.
Group membership is not considered in this comparison. This is somewhat
problematic, but cannot easily be helped, because considering group
membership would make it difficult to add and remove groups from vertices.
It also makes it impossible to meaningfully compare with a concrete
EggVertex object (which cannot have group memberships).
However, this is not altogether bad, because two vertices that are
identical in all other properties should generally also be identical in
group memberships, else the vertices will tend to fly apart when the joints
animate.
*/
- copyGrefsFrom()
C++ Interface: copy_grefs_from(const EggVertex self, const EggVertex other)
- /**
Copies all the group references from the other vertex onto this one. This
assigns the current vertex to exactly the same groups, with exactly the
same memberships, as the given one.
Warning: only an EggVertex allocated from the free store may have groups
assigned to it. Do not attempt to call this on a temporary concrete
EggVertex object; a core dump will certainly result.
*/
- copy_grefs_from()
C++ Interface: copy_grefs_from(const EggVertex self, const EggVertex other)
- /**
Copies all the group references from the other vertex onto this one. This
assigns the current vertex to exactly the same groups, with exactly the
same memberships, as the given one.
Warning: only an EggVertex allocated from the free store may have groups
assigned to it. Do not attempt to call this on a temporary concrete
EggVertex object; a core dump will certainly result.
*/
- getAux()
C++ Interface: get_aux(EggVertex self, str name)
- /**
Returns the named auxiliary data quadruple on the vertex. It is an error
to call this if has_aux(name) returned false.
*/
- getAuxObj()
C++ Interface: get_aux_obj(EggVertex self, str name)
- /**
Returns the named EggVertexAux object, which defines the auxiliary data for
this name. This object might be shared between multiple vertices. You
should not attempt to modify this object; instead, call modify_aux_object
to return a modifiable pointer.
*/
- getClassType()
C++ Interface: get_class_type()
- getExternalIndex()
C++ Interface: get_external_index(EggVertex self)
- /**
Returns the number set by set_external_index(). See set_external_index().
*/
- getExternalIndex2()
C++ Interface: get_external_index2(EggVertex self)
- /**
Returns the number set by set_external_index2(). See
set_external_index2().
*/
- getIndex()
C++ Interface: get_index(EggVertex self)
- /**
Returns the index number of the vertex within its pool.
*/
- getNumDimensions()
C++ Interface: get_num_dimensions(EggVertex self)
// get_pos[123] return the pos as the corresponding type. It is an error to // call any of these without first verifying that get_num_dimensions() // matches the desired type. However, get_pos4() may always be called; it // returns the pos as a four-component point in homogeneous space (with a // 1.0 in the last position if the pos has fewer than four components).
- /**
Returns the number of dimensions the vertex uses. Usually this will be 3,
but it may be 1, 2, 3, or 4.
*/
- getNumGlobalCoord()
C++ Interface: get_num_global_coord(EggVertex self)
- /**
Returns the number of primitives that own this vertex whose vertices are
interpreted in the global coordinate system.
*/
- getNumLocalCoord()
C++ Interface: get_num_local_coord(EggVertex self)
- /**
Returns the number of primitives that own this vertex whose vertices are
interpreted to be in a local coordinate system.
*/
- getPool()
C++ Interface: get_pool(EggVertex self)
- /**
Returns the vertex pool this vertex belongs in. This may be NULL if the
vertex has not been added to a pool.
*/
- getPos1()
C++ Interface: get_pos1(EggVertex self)
- /**
Only valid if get_num_dimensions() returns 1. Returns the position as a
one-dimensional value.
*/
- getPos2()
C++ Interface: get_pos2(EggVertex self)
- /**
Only valid if get_num_dimensions() returns 2. Returns the position as a
two-dimensional value.
*/
- getPos3()
C++ Interface: get_pos3(EggVertex self)
- /**
Valid if get_num_dimensions() returns 3 or 4. Returns the position as a
three-dimensional value.
*/
- getPos4()
C++ Interface: get_pos4(EggVertex self)
- /**
This is always valid, regardless of the value of get_num_dimensions. It
returns the position as a four-dimensional value. If the pos has fewer
than four dimensions, this value represents the pos extended into four-
dimensional homogenous space, e.g. by adding 1 as the fourth component.
*/
- getUv()
C++ Interface: get_uv(EggVertex self) get_uv(EggVertex self, str name)
- /**
Returns the unnamed UV coordinate pair on the vertex. It is an error to
call this if has_uv() has returned false.
This is the more restrictive interface, and is generally useful only in the
absence of multitexturing; see get_uv(name) for the interface that supports
multitexturing.
*/
- /**
Returns the named UV coordinate pair on the vertex. It is an error to call
this if has_uv(name) returned false.
*/
- getUvObj()
C++ Interface: get_uv_obj(EggVertex self, str name)
- /**
Returns the named EggVertexUV object, which defines both the UV coordinate
pair for this name and the UV morphs. This object might be shared between
multiple vertices. You should not attempt to modify this object; instead,
call modify_uv_object to return a modifiable pointer.
*/
- getUvw()
C++ Interface: get_uvw(EggVertex self, str name)
- /**
Returns the named UV coordinate triple on the vertex. It is an error to
call this if has_uvw(name) returned false.
*/
- get_aux()
C++ Interface: get_aux(EggVertex self, str name)
- /**
Returns the named auxiliary data quadruple on the vertex. It is an error
to call this if has_aux(name) returned false.
*/
- get_aux_obj()
C++ Interface: get_aux_obj(EggVertex self, str name)
- /**
Returns the named EggVertexAux object, which defines the auxiliary data for
this name. This object might be shared between multiple vertices. You
should not attempt to modify this object; instead, call modify_aux_object
to return a modifiable pointer.
*/
- get_class_type()
C++ Interface: get_class_type()
- get_external_index()
C++ Interface: get_external_index(EggVertex self)
- /**
Returns the number set by set_external_index(). See set_external_index().
*/
- get_external_index2()
C++ Interface: get_external_index2(EggVertex self)
- /**
Returns the number set by set_external_index2(). See
set_external_index2().
*/
- get_index()
C++ Interface: get_index(EggVertex self)
- /**
Returns the index number of the vertex within its pool.
*/
- get_num_dimensions()
C++ Interface: get_num_dimensions(EggVertex self)
// get_pos[123] return the pos as the corresponding type. It is an error to // call any of these without first verifying that get_num_dimensions() // matches the desired type. However, get_pos4() may always be called; it // returns the pos as a four-component point in homogeneous space (with a // 1.0 in the last position if the pos has fewer than four components).
- /**
Returns the number of dimensions the vertex uses. Usually this will be 3,
but it may be 1, 2, 3, or 4.
*/
- get_num_global_coord()
C++ Interface: get_num_global_coord(EggVertex self)
- /**
Returns the number of primitives that own this vertex whose vertices are
interpreted in the global coordinate system.
*/
- get_num_local_coord()
C++ Interface: get_num_local_coord(EggVertex self)
- /**
Returns the number of primitives that own this vertex whose vertices are
interpreted to be in a local coordinate system.
*/
- get_pool()
C++ Interface: get_pool(EggVertex self)
- /**
Returns the vertex pool this vertex belongs in. This may be NULL if the
vertex has not been added to a pool.
*/
- get_pos1()
C++ Interface: get_pos1(EggVertex self)
- /**
Only valid if get_num_dimensions() returns 1. Returns the position as a
one-dimensional value.
*/
- get_pos2()
C++ Interface: get_pos2(EggVertex self)
- /**
Only valid if get_num_dimensions() returns 2. Returns the position as a
two-dimensional value.
*/
- get_pos3()
C++ Interface: get_pos3(EggVertex self)
- /**
Valid if get_num_dimensions() returns 3 or 4. Returns the position as a
three-dimensional value.
*/
- get_pos4()
C++ Interface: get_pos4(EggVertex self)
- /**
This is always valid, regardless of the value of get_num_dimensions. It
returns the position as a four-dimensional value. If the pos has fewer
than four dimensions, this value represents the pos extended into four-
dimensional homogenous space, e.g. by adding 1 as the fourth component.
*/
- get_uv()
C++ Interface: get_uv(EggVertex self) get_uv(EggVertex self, str name)
- /**
Returns the unnamed UV coordinate pair on the vertex. It is an error to
call this if has_uv() has returned false.
This is the more restrictive interface, and is generally useful only in the
absence of multitexturing; see get_uv(name) for the interface that supports
multitexturing.
*/
- /**
Returns the named UV coordinate pair on the vertex. It is an error to call
this if has_uv(name) returned false.
*/
- get_uv_obj()
C++ Interface: get_uv_obj(EggVertex self, str name)
- /**
Returns the named EggVertexUV object, which defines both the UV coordinate
pair for this name and the UV morphs. This object might be shared between
multiple vertices. You should not attempt to modify this object; instead,
call modify_uv_object to return a modifiable pointer.
*/
- get_uvw()
C++ Interface: get_uvw(EggVertex self, str name)
- /**
Returns the named UV coordinate triple on the vertex. It is an error to
call this if has_uvw(name) returned false.
*/
- hasAux()
C++ Interface: has_aux(EggVertex self) has_aux(EggVertex self, str name)
- hasGref()
C++ Interface: has_gref(EggVertex self, const EggGroup group)
- /**
Returns true if the indicated group references this vertex, false
otherwise.
*/
- hasPref()
C++ Interface: has_pref(EggVertex self, const EggPrimitive prim)
- /**
Returns the number of times the vertex appears in the indicated primitive,
or 0 if it does not appear.
*/
- hasUv()
C++ Interface: has_uv(EggVertex self) has_uv(EggVertex self, str name)
- /**
Returns true if the vertex has an unnamed UV coordinate pair, false
otherwise.
This is the more restrictive interface, and is generally useful only in the
absence of multitexturing; see has_uv(name) for the interface that supports
multitexturing.
*/
- /**
Returns true if the vertex has the named UV coordinate pair, and the named
UV coordinate pair is 2-d, false otherwise.
*/
- hasUvw()
C++ Interface: has_uvw(EggVertex self, str name)
- /**
Returns true if the vertex has the named UV coordinate triple, and the
named UV coordinate triple is 3-d, false otherwise.
*/
- has_aux()
C++ Interface: has_aux(EggVertex self) has_aux(EggVertex self, str name)
- has_gref()
C++ Interface: has_gref(EggVertex self, const EggGroup group)
- /**
Returns true if the indicated group references this vertex, false
otherwise.
*/
- has_pref()
C++ Interface: has_pref(EggVertex self, const EggPrimitive prim)
- /**
Returns the number of times the vertex appears in the indicated primitive,
or 0 if it does not appear.
*/
- has_uv()
C++ Interface: has_uv(EggVertex self) has_uv(EggVertex self, str name)
- /**
Returns true if the vertex has an unnamed UV coordinate pair, false
otherwise.
This is the more restrictive interface, and is generally useful only in the
absence of multitexturing; see has_uv(name) for the interface that supports
multitexturing.
*/
- /**
Returns true if the vertex has the named UV coordinate pair, and the named
UV coordinate pair is 2-d, false otherwise.
*/
- has_uvw()
C++ Interface: has_uvw(EggVertex self, str name)
- /**
Returns true if the vertex has the named UV coordinate triple, and the
named UV coordinate triple is 3-d, false otherwise.
*/
- isForwardReference()
C++ Interface: is_forward_reference(EggVertex self)
- /**
Returns true if the vertex is a forward reference to some vertex that
hasn’t been defined yet. In this case, the vertex may not have any
properties filled in yet.
This can only happen if you implicitly create a vertex via
EggVertexPool::get_forward_vertex(). Presumably, when the vertex pool is
later filled in, this vertex will be replaced with real data.
*/
- is_forward_reference()
C++ Interface: is_forward_reference(EggVertex self)
- /**
Returns true if the vertex is a forward reference to some vertex that
hasn’t been defined yet. In this case, the vertex may not have any
properties filled in yet.
This can only happen if you implicitly create a vertex via
EggVertexPool::get_forward_vertex(). Presumably, when the vertex pool is
later filled in, this vertex will be replaced with real data.
*/
- makeAverage()
C++ Interface: make_average(const EggVertex first, const EggVertex second)
- /**
Creates a new vertex that lies in between the two given vertices. The
attributes for the UV sets they have in common are averaged.
Both vertices need to be either in no pool, or in the same pool. In the
latter case, the new vertex will be placed in that pool.
*/
- make_average()
C++ Interface: make_average(const EggVertex first, const EggVertex second)
- /**
Creates a new vertex that lies in between the two given vertices. The
attributes for the UV sets they have in common are averaged.
Both vertices need to be either in no pool, or in the same pool. In the
latter case, the new vertex will be placed in that pool.
*/
- modifyAuxObj()
C++ Interface: modify_aux_obj(const EggVertex self, str name)
- /**
Returns a modifiable pointer to the named EggVertexAux object, which
defines the auxiliary data for this name. Returns NULL if there is no such
named UV object.
*/
- modifyUvObj()
C++ Interface: modify_uv_obj(const EggVertex self, str name)
- /**
Returns a modifiable pointer to the named EggVertexUV object, which defines
both the UV coordinate pair for this name and the UV morphs. Returns NULL
if there is no such named UV object.
*/
- modify_aux_obj()
C++ Interface: modify_aux_obj(const EggVertex self, str name)
- /**
Returns a modifiable pointer to the named EggVertexAux object, which
defines the auxiliary data for this name. Returns NULL if there is no such
named UV object.
*/
- modify_uv_obj()
C++ Interface: modify_uv_obj(const EggVertex self, str name)
- /**
Returns a modifiable pointer to the named EggVertexUV object, which defines
both the UV coordinate pair for this name and the UV morphs. Returns NULL
if there is no such named UV object.
*/
- setAux()
C++ Interface: set_aux(const EggVertex self, str name, const LVecBase4d aux)
- /**
Sets the indicated auxiliary data quadruple on the vertex. This replaces
any auxiliary data with the same name already on the vertex.
*/
- setAuxObj()
C++ Interface: set_aux_obj(const EggVertex self, EggVertexAux vertex_aux)
- /**
Sets the indicated EggVertexAux on the vertex. This replaces any auxiliary
data with the same name already on the vertex.
*/
- setExternalIndex()
C++ Interface: set_external_index(const EggVertex self, int external_index)
- /**
Sets a special index number that is associated with the EggVertex (but is
not written to the egg file). This number is not interpreted by any egg
code; it is simply maintained along with the vertex. It is used to
differentiate otherwise identical vertices in
EggVertexPool::create_unique_vertex(), however.
The intention of this number is as an aid for file converters, to associate
an EggVertex back to the index number of the original source vertex.
*/
- setExternalIndex2()
C++ Interface: set_external_index2(const EggVertex self, int external_index2)
- /**
Similar to set_external_index(), but this is a different number which may
be used for a different purpose by the calling code. The egg library does
not assign any meaning to this number or use it in any way.
*/
- setPos()
C++ Interface: set_pos(const EggVertex self, const LPoint4d pos) set_pos(const EggVertex self, const LPoint2d pos) set_pos(const EggVertex self, const LPoint3d pos) set_pos(const EggVertex self, double pos)
// The pos might have 1, 2, 3, or 4 dimensions. That complicates things a // bit.
- /**
Sets the vertex position. This variant sets the vertex to a one-
dimensional value.
*/
- /**
Sets the vertex position. This variant sets the vertex to a two-
dimensional value.
*/
- /**
Sets the vertex position. This variant sets the vertex to a three-
dimensional value.
*/
- /**
Sets the vertex position. This variant sets the vertex to a four-
dimensional value.
*/
- setPos4()
C++ Interface: set_pos4(const EggVertex self, const LPoint4d pos)
- /**
This special flavor of set_pos() sets the vertex as a four-component value,
but does not change the set number of dimensions. It’s handy for
retrieving the vertex position via get_pos4, manipulating it, then storing
it back again, without worrying about the number of dimensions it actually
had.
*/
- setUv()
C++ Interface: set_uv(const EggVertex self, const LPoint2d texCoord) set_uv(const EggVertex self, str name, const LPoint2d texCoord)
- /**
Replaces the unnamed UV coordinate pair on the vertex with the indicated
value.
This is the more restrictive interface, and is generally useful only in the
absence of multitexturing; see set_uv(name, uv) for the interface that
supports multitexturing.
*/
- /**
Sets the indicated UV coordinate pair on the vertex. This replaces any UV
coordinate pair with the same name already on the vertex, but preserves UV
morphs.
*/
- setUvObj()
C++ Interface: set_uv_obj(const EggVertex self, EggVertexUV vertex_uv)
- /**
Sets the indicated EggVertexUV on the vertex. This replaces any UV
coordinate pair with the same name already on the vertex, including UV
morphs.
*/
- setUvw()
C++ Interface: set_uvw(const EggVertex self, str name, const LPoint3d texCoord)
- /**
Sets the indicated UV coordinate triple on the vertex. This replaces any
UV coordinate pair or triple with the same name already on the vertex, but
preserves UV morphs.
*/
- set_aux()
C++ Interface: set_aux(const EggVertex self, str name, const LVecBase4d aux)
- /**
Sets the indicated auxiliary data quadruple on the vertex. This replaces
any auxiliary data with the same name already on the vertex.
*/
- set_aux_obj()
C++ Interface: set_aux_obj(const EggVertex self, EggVertexAux vertex_aux)
- /**
Sets the indicated EggVertexAux on the vertex. This replaces any auxiliary
data with the same name already on the vertex.
*/
- set_external_index()
C++ Interface: set_external_index(const EggVertex self, int external_index)
- /**
Sets a special index number that is associated with the EggVertex (but is
not written to the egg file). This number is not interpreted by any egg
code; it is simply maintained along with the vertex. It is used to
differentiate otherwise identical vertices in
EggVertexPool::create_unique_vertex(), however.
The intention of this number is as an aid for file converters, to associate
an EggVertex back to the index number of the original source vertex.
*/
- set_external_index2()
C++ Interface: set_external_index2(const EggVertex self, int external_index2)
- /**
Similar to set_external_index(), but this is a different number which may
be used for a different purpose by the calling code. The egg library does
not assign any meaning to this number or use it in any way.
*/
- set_pos()
C++ Interface: set_pos(const EggVertex self, const LPoint4d pos) set_pos(const EggVertex self, const LPoint2d pos) set_pos(const EggVertex self, const LPoint3d pos) set_pos(const EggVertex self, double pos)
// The pos might have 1, 2, 3, or 4 dimensions. That complicates things a // bit.
- /**
Sets the vertex position. This variant sets the vertex to a one-
dimensional value.
*/
- /**
Sets the vertex position. This variant sets the vertex to a two-
dimensional value.
*/
- /**
Sets the vertex position. This variant sets the vertex to a three-
dimensional value.
*/
- /**
Sets the vertex position. This variant sets the vertex to a four-
dimensional value.
*/
- set_pos4()
C++ Interface: set_pos4(const EggVertex self, const LPoint4d pos)
- /**
This special flavor of set_pos() sets the vertex as a four-component value,
but does not change the set number of dimensions. It’s handy for
retrieving the vertex position via get_pos4, manipulating it, then storing
it back again, without worrying about the number of dimensions it actually
had.
*/
- set_uv()
C++ Interface: set_uv(const EggVertex self, const LPoint2d texCoord) set_uv(const EggVertex self, str name, const LPoint2d texCoord)
- /**
Replaces the unnamed UV coordinate pair on the vertex with the indicated
value.
This is the more restrictive interface, and is generally useful only in the
absence of multitexturing; see set_uv(name, uv) for the interface that
supports multitexturing.
*/
- /**
Sets the indicated UV coordinate pair on the vertex. This replaces any UV
coordinate pair with the same name already on the vertex, but preserves UV
morphs.
*/
- set_uv_obj()
C++ Interface: set_uv_obj(const EggVertex self, EggVertexUV vertex_uv)
- /**
Sets the indicated EggVertexUV on the vertex. This replaces any UV
coordinate pair with the same name already on the vertex, including UV
morphs.
*/
- set_uvw()
C++ Interface: set_uvw(const EggVertex self, str name, const LPoint3d texCoord)
- /**
Sets the indicated UV coordinate triple on the vertex. This replaces any
UV coordinate pair or triple with the same name already on the vertex, but
preserves UV morphs.
*/
- sortsLessThan()
C++ Interface: sorts_less_than(EggVertex self, const EggVertex other)
- /**
An ordering operator to compare two vertices for sorting order. This
imposes an arbitrary ordering useful to identify unique vertices.
*/
- sorts_less_than()
C++ Interface: sorts_less_than(EggVertex self, const EggVertex other)
- /**
An ordering operator to compare two vertices for sorting order. This
imposes an arbitrary ordering useful to identify unique vertices.
*/
- testGrefIntegrity()
C++ Interface: test_gref_integrity(EggVertex self)
- testPrefIntegrity()
C++ Interface: test_pref_integrity(EggVertex self)
- test_gref_integrity()
C++ Interface: test_gref_integrity(EggVertex self)
- test_pref_integrity()
C++ Interface: test_pref_integrity(EggVertex self)
- transform()
C++ Interface: transform(const EggVertex self, const LMatrix4d mat)
- /**
Applies the indicated transformation matrix to the vertex.
*/
- upcastToEggAttributes()
C++ Interface: upcast_to_EggAttributes(const EggVertex self)
upcast from EggVertex to EggAttributes
- upcastToEggObject()
C++ Interface: upcast_to_EggObject(const EggVertex self)
upcast from EggVertex to EggObject
- upcast_to_EggAttributes()
C++ Interface: upcast_to_EggAttributes(const EggVertex self)
upcast from EggVertex to EggAttributes
- upcast_to_EggObject()
C++ Interface: upcast_to_EggObject(const EggVertex self)
upcast from EggVertex to EggObject