36 m_Type = WRL1NODES::WRL1_TRANSFORM;
43 m_Type = WRL1NODES::WRL1_TRANSFORM;
54 wxT(
" * [INFO] Destroying Transform node with %zu children, %zu"
55 "references, and %zu back pointers." ),
74 wxCHECK_MSG( aTopNode,
false, wxT(
"Invalid top node." ) );
93 char tok = proc.
Peek();
98 " * [INFO] bad file format; unexpected eof %s." ),
108 " * [INFO] bad file format; expecting '{' but got '%s' %s." ),
119 if( proc.
Peek() ==
'}' )
129 __FILE__, __FUNCTION__, __LINE__ , proc.
GetError() );
141 if( !glob.compare(
"center" ) )
146 " * [INFO] invalid center %s\n"
147 " * [INFO] file: '%s'\n"
160 else if( !glob.compare(
"rotation" ) )
165 " * [INFO] invalid rotation %s\n"
166 " * [INFO] file: '%s'\n"
174 else if( !glob.compare(
"scaleFactor" ) )
179 " * [INFO] invalid scale %s\n"
180 " * [INFO] file: '%s'\n"
188 else if( !glob.compare(
"scaleOrientation" ) )
193 " * [INFO] invalid scaleOrientation %s\n"
194 " * [INFO] file: '%s'\n"
202 else if( !glob.compare(
"translation" ) )
207 " * [INFO] invalid translation %s\n"
208 " * [INFO] file: '%s'\n"
224 " * [INFO] invalid Transform %s\n"
225 " * [INFO] file: '%s'" ),
240 wxCHECK_MSG(
false,
false, wxT(
"AddRefNode is not applicable" ) );
247 wxCHECK_MSG(
false,
false, wxT(
"AddChildNode is not applicable." ) );
259 wxCHECK_MSG( sp,
nullptr, wxT(
"Bad model: no base data given" ) );
262 float rX, rY, rZ, rW;
267 glm::mat4 rM = glm::rotate( glm::mat4( 1.0f ), rW, glm::vec3( rX, rY, rZ ) );
274 glm::mat4 tM = glm::translate( glm::mat4( 1.0f ), glm::vec3( dX, dY, dZ ) );
280 glm::mat4 cM = glm::translate( glm::mat4( 1.0f ), glm::vec3( dX, dY, dZ ) );
281 glm::mat4 ncM = glm::translate( glm::mat4( 1.0f ), glm::vec3( -dX, -dY, -dZ ) );
284 glm::mat4 sM = glm::scale( glm::mat4( 1.0 ), glm::vec3(
scale.x,
scale.y,
scale.z ) );
291 glm::mat4 srM = glm::rotate( glm::mat4( 1.0f ), rW, glm::vec3( rX, rY, rZ ) );
292 glm::mat4 nsrM = glm::rotate( glm::mat4( 1.0f ), -rW, glm::vec3( rX, rY, rZ ) );
The base class of all Scene Graph nodes.
Represent the top node of a VRML1 model.
The base class of all VRML1 nodes.
virtual bool AddChildNode(WRL1NODE *aNode)
std::list< WRL1NODE * > m_BackPointers
std::list< WRL1NODE * > m_Children
std::list< WRL1NODE * > m_Refs
WRL1NODES GetNodeType(void) const
Return the type of this node instance.
std::string GetFileName(void)
std::string GetError(void)
bool ReadName(std::string &aName)
std::string GetFilePosition() const
bool ReadSFRotation(WRLROTATION &aSFRotation)
bool ReadSFVec3f(WRLVEC3F &aSFVec3f)
const wxChar *const traceVrmlPlugin
Flag to enable VRML plugin trace output.
collects header files for all SG* wrappers and the API