My Project
|
writing the scene to script file. More...
#include <SceneWriter.h>
Public Types | |
enum | ENCODING { NPL_TEXT, NPL_BINARY, NPL_COMPRESSED, XML_TEXT } |
encoding, one can combine them with bit and operation. More... | |
Public Member Functions | |
CSceneWriter (CParaFile &file) | |
Initializes a new instance of the scene writer class for the specified file, using the default encoding and buffer size. More... | |
void | Close () |
Closes the current writer and the underlying file stream. More... | |
void | Flush () |
Clears all buffers for the current writer and causes any buffered data to be written to the underlying stream. More... | |
DWORD | GetEncoding () |
Gets the Encoding in which the output is written. More... | |
void | SetEncoding (DWORD dwEncoding) |
Sets the Encoding in which the output is written. More... | |
void | WriteLine () |
Writes some data as specified by the overloaded parameters, followed by a line terminator. More... | |
void | WriteLine (const string &str) |
void | WriteLine (double dValue) |
void | Write (const string &str) |
Writes some data as specified by the overloaded parameters. More... | |
void | Write (const char *pData, int nSize) |
void | Write (double dValue) |
void | BeginManagedLoader (const string &sLoaderName) |
write the begin managed loader | |
void | EndManagedLoader () |
write the end managed loader | |
void | WriteRegion (const CShapeAABB &aabb) |
write all static scene objects in a rectangular region to the current file. More... | |
writing the scene to script file.
encoding, one can combine them with bit and operation.
CSceneWriter::CSceneWriter | ( | CParaFile & | file | ) |
Initializes a new instance of the scene writer class for the specified file, using the default encoding and buffer size.
It will write after the current file pointer.
void CSceneWriter::Close | ( | ) |
Closes the current writer and the underlying file stream.
void CSceneWriter::Flush | ( | ) |
Clears all buffers for the current writer and causes any buffered data to be written to the underlying stream.
DWORD CSceneWriter::GetEncoding | ( | ) |
Gets the Encoding in which the output is written.
void CSceneWriter::SetEncoding | ( | DWORD | dwEncoding | ) |
Sets the Encoding in which the output is written.
void CSceneWriter::Write | ( | const string & | str | ) |
Writes some data as specified by the overloaded parameters.
void ParaEngine::CSceneWriter::WriteLine | ( | ) |
Writes some data as specified by the overloaded parameters, followed by a line terminator.
void CSceneWriter::WriteRegion | ( | const CShapeAABB & | aabb | ) |
write all static scene objects in a rectangular region to the current file.
if the world position is inside the region, then the object is exported.
sParent | to which NPL variable the data should be attached. |
breadth first transversing the scene(the root tile is ignored) pTile is now the root tile. object attached to it are never rendered directly
add other tiles
rough culling algorithm using the quad tree terrain tiles test against a sphere round the eye
go down the quad tree terrain tile to render objects
even we know that the tile is empty, we still need to see if there is anything in the queueNode for rendering so when both queue are empty, we can exit the main rendering transversing loop
We will now push objects in the current terrain tile to a queue object for further view clipping.
sort by asset
write objects