#include <VrmlData_Scene.hxx>
|
| VrmlData_Scene (const Handle< NCollection_IncAllocator > &=0L) |
|
VrmlData_ErrorStatus | Status () const |
|
void | SetVrmlDir (const TCollection_ExtendedString &) |
|
void | SetLinearScale (const Standard_Real theScale) |
|
NCollection_List
< TCollection_ExtendedString >
::Iterator | VrmlDirIterator () const |
|
Iterator | GetIterator () const |
|
VrmlData_MapOfNode::Iterator | NamedNodesIterator () const |
|
const Handle
< NCollection_IncAllocator > & | Allocator () const |
|
const Handle< VrmlData_Node > & | AddNode (const Handle< VrmlData_Node > &theN, const Standard_Boolean isTopLevel=Standard_True) |
|
Handle< VrmlData_Node > | FindNode (const char *theName, const Handle< Standard_Type > &theType=0L) const |
|
Handle< VrmlData_Node > | FindNode (const char *theName, gp_Trsf &theLocation) const |
|
VrmlData_Scene & | operator<< (Standard_IStream &theInput) |
|
| operator TopoDS_Shape () const |
|
TopoDS_Shape | GetShape (VrmlData_DataMapOfShapeAppearance &M) |
|
const Handle
< VrmlData_WorldInfo > & | WorldInfo () const |
|
void | Dump (Standard_OStream &theStream) const |
|
VrmlData_ErrorStatus | ReadReal (VrmlData_InBuffer &theBuffer, Standard_Real &theResult, Standard_Boolean isApplyScale, Standard_Boolean isOnlyPositive) const |
|
VrmlData_ErrorStatus | ReadXYZ (VrmlData_InBuffer &theBuffer, gp_XYZ &theXYZ, Standard_Boolean isApplyScale, Standard_Boolean isOnlyPositive) const |
|
VrmlData_ErrorStatus | ReadXY (VrmlData_InBuffer &theBuffer, gp_XY &theXYZ, Standard_Boolean isApplyScale, Standard_Boolean isOnlyPositive) const |
|
VrmlData_ErrorStatus | ReadArrIndex (VrmlData_InBuffer &theBuffer, const Standard_Integer **&theArr, Standard_Size &theNBl) const |
|
Standard_Integer | GetLineError () const |
|
void | SetIndent (const Standard_Integer nSpc) |
|
VrmlData_ErrorStatus | WriteXYZ (const gp_XYZ &theXYZ, const Standard_Boolean isScale, const char *thePostfix=0L) const |
|
VrmlData_ErrorStatus | WriteArrIndex (const char *thePrefix, const Standard_Integer **theArr, const Standard_Size theNbBl) const |
|
VrmlData_ErrorStatus | WriteLine (const char *theLine0, const char *theLine1=0L, const Standard_Integer theIndent=0) const |
|
VrmlData_ErrorStatus | WriteNode (const char *thePrefix, const Handle< VrmlData_Node > &) const |
|
Standard_Boolean | IsDummyWrite () const |
|
Block of comments describing class VrmlData_Scene
Iterator type to get all contained Nodes one-by-one.
Add a Node. If theN belongs to another Scene, it is cloned.
VrmlData_WorldInfo cannot be added, in this case the method returns a NULL handle.
Allocator used by all nodes contained in the Scene.
Create the node.
- Parameters
-
theBuffer | Input buffer from where the node is created |
theNode | Output parameter, contains the created node on exit |
Type | Node type to be checked. If it is NULL no type checking is done. Otherwise the created node is matched and an error is returned if no match detected. |
Create a single Shape object from all geometric nodes in the list.
Diagnostic dump of the contents
Find a node by its name.
- Parameters
-
theName | Name of the node to find. |
theType | Type to match. If this value is NULL, the first found node with the given name is returned. If theType is given, only the node that has that type is returned. |
Find a node by its name.
- Parameters
-
theName | Name of the node to search for. |
theLocation | Location of the found node with respect to the whole VRML shape. |
Iterator VrmlData_Scene::GetIterator |
( |
| ) |
const |
|
inline |
Query the line where the error occurred (if the status is not OK)
Convert the scene to a Shape, with the information on materials defined for each sub-shape. This method should be used instead of TopoDS_Shape explicit conversion operator when you need to retrieve the material aspect for each face or edge in the returned topological object.
- Parameters
-
M | Data Map that binds an Appearance instance to each created TFace or TEdge if the Appearance node is defined in VRML scene for that geometry. |
- Returns
- TopoDS_Shape (Compound) holding all the scene, similar to the result of explicit TopoDS_Shape conversion operator.
Query if the current write operation is dummy, i.e., for the purpose of collecting information before the real write is commenced.
Get the iterator of named nodes.
Convert the scene to a Shape.
Import from text stream (file or else). This method is protected by Mutex, it is not allowed to read/write two VRML streams concurrently.
Read an array of integer indices, for IndexedfaceSet and IndexedLineSet.
Read and verify the VRML header (the 1st line of the file)
Read a VRML line. Empty lines and comments are skipped. The processing starts here from theBuffer.LinePtr; if there is at least one non-empty character (neither space nor comment), this line is used without reading the next one.
- Parameters
-
theLine | Buffer receiving the input line |
theInput | Input stream |
theLen | Length of the input buffer (maximal line length) |
Read whatever line from the input checking the istream flags.
Read a singel word from the input stream, delimited by whitespace.
Read one doublet of real values.
Read one triplet of real values.
Store the indentation for VRML output.
- Parameters
-
nSpc | number of spaces to insert at every indentation level |
void VrmlData_Scene::SetLinearScale |
( |
const Standard_Real |
theScale | ) |
|
|
inline |
Set the scale factor that would be further used in methods ReadReal, ReadXYZ and ReadXY. All coordinates, distances and sized are multiplied by this factor during reading the data.
Add the given directory path to the list of VRML file search directories. This method forms the list of directories ordered according to the sequence of this method calls. When an Inline node is found, the URLs in that node are matched with these directories. The last (implicit) search directory is the current process directory ("."). It takes effect if the list is empty or if there is no match with exisiting directories.
Query the status of the previous operation. Normally it should be equal to VrmlData_StatusOK (no error).
Returns the directory iterator, to check the presence of requested VRML file in each iterated directory.
Query the WorldInfo member.
Write an array of integer indices, for IndexedFaceSet and IndexedLineSet.
Write a string to the output stream respecting the indentation. The string can be defined as two substrings that will be separated by a space. Each of the substrings can be NULL, then it is ignored. If both are NULL, then a single newline is output (without indent).
- Parameters
-
theLine0 | The first part of string to output |
theLine1 | The second part of string to output |
theIndent |
- 0 value ignored.
- negative decreases the current indent and then outputs.
- positive outputs and then increases the current indent.
|
- Returns
- Error status of the stream, or a special error if myOutput == NULL.
Write the given node to output stream 'myOutput'.
Write a triplet of real values on a separate line.
- Parameters
-
theXYZ | The value to be output. |
isScale | If True, then each component is divided by myLinearScale. |
thePostfix | Optional string that is added before the end of the line. |
Export to text stream (file or else). This method is protected by Mutex, it is not allowed to read/write two VRML streams concurrently. The stream should give as the first line the VRML header: #VRML V2.0 <encoding type>=""> [optional comment] <line terminator>="">
The documentation for this class was generated from the following file: