39 operator = (
const EggNode ©) {
40 EggNamedObject::operator = (copy);
69 return (_under_flags & UF_under_instance) != 0;
78 return (_under_flags & UF_under_transform) != 0;
88 return (_under_flags & UF_local_coord) != 0;
109 if (_vertex_frame ==
nullptr) {
110 return LMatrix4d::ident_mat();
112 return *_vertex_frame;
123 if (_node_frame ==
nullptr) {
124 return LMatrix4d::ident_mat();
136 if (_vertex_frame_inv ==
nullptr) {
137 return LMatrix4d::ident_mat();
139 return *_vertex_frame_inv;
150 if (_node_frame_inv ==
nullptr) {
151 return LMatrix4d::ident_mat();
153 return *_node_frame_inv;
167 if (_vertex_to_node ==
nullptr) {
168 return LMatrix4d::ident_mat();
170 return *_vertex_to_node;
184 if (_node_to_vertex ==
nullptr) {
185 return LMatrix4d::ident_mat();
187 return *_node_to_vertex;
197 return _vertex_frame;
216 return _vertex_frame_inv;
226 return _node_frame_inv;
235 return _vertex_to_node;
244 return _node_to_vertex;
254 LMatrix4d inv = invert(mat);
256 r_transform(mat, inv, CS_default);
257 r_transform_vertices(mat);
271 r_transform_vertices(mat);
285 r_flatten_transforms();
void transform(const LMatrix4d &mat)
Applies the indicated transformation to the node and all of its descendants.
const LMatrix4d & get_node_frame_inv() const
Returns the inverse of the matrix returned by get_node_frame().
const LMatrix4d * get_node_frame_ptr() const
Returns either a NULL pointer or a unique pointer shared by nodes with the same get_node_frame() matr...
const LMatrix4d & get_vertex_frame() const
Returns the coordinate frame of the vertices referenced by primitives at or under this node.
A base class for nodes in the hierarchy that are not leaf nodes.
const LMatrix4d * get_node_to_vertex_ptr() const
Returns either a NULL pointer or a unique pointer shared by nodes with the same get_node_to_vertex() ...
const LMatrix4d * get_vertex_frame_ptr() const
Returns either a NULL pointer or a unique pointer shared by nodes with the same get_vertex_frame() ma...
const LMatrix4d * get_vertex_to_node_ptr() const
Returns either a NULL pointer or a unique pointer shared by nodes with the same get_vertex_to_node() ...
bool is_local_coord() const
Returns true if this node's vertices are not in the global coordinate space.
bool is_under_transform() const
Returns true if there is a <Transform> entry somewhere in the egg tree at or above this node,...
const LMatrix4d & get_node_frame() const
Returns the coordinate frame of the node itself.
const LMatrix4d & get_node_to_vertex() const
Returns the transformation matrix suitable for converting vertices in the coordinate space of the nod...
void transform_vertices_only(const LMatrix4d &mat)
Applies the indicated transformation only to vertices that appear in global space within vertex pools...
void flatten_transforms()
Removes any transform and instance records from this node in the scene graph and below.
This is a fairly low-level base class–any egg object that has a name.
bool is_under_instance() const
Returns true if there is an <Instance> node somewhere in the egg tree at or above this node,...
A base class for things that may be directly added into the egg hierarchy.
const LMatrix4d * get_node_frame_inv_ptr() const
Returns either a NULL pointer or a unique pointer shared by nodes with the same get_node_frame_inv() ...
const LMatrix4d * get_vertex_frame_inv_ptr() const
Returns either a NULL pointer or a unique pointer shared by nodes with the same get_vertex_frame_inv(...
const LMatrix4d & get_vertex_to_node() const
Returns the transformation matrix suitable for converting the vertices as read from the egg file into...
const LMatrix4d & get_vertex_frame_inv() const
Returns the inverse of the matrix returned by get_vertex_frame().