16#include "coregraphics/vertexbuffer.h"
17#include "coregraphics/indexbuffer.h"
19#include "coregraphics/base/vertexbufferbase.h"
20#include "coregraphics/base/memoryvertexbufferloaderbase.h"
21#include "coregraphics/base/indexbufferbase.h"
22#include "coregraphics/base/memoryindexbufferloaderbase.h"
43 Base::ResourceBase::Usage
GetUsage()
const;
47 Base::ResourceBase::Access
GetAccess()
const;
274 this->
usage = usage_;
280inline Base::ResourceBase::Usage
298inline Base::ResourceBase::Access
Definition nvx3streamreader.h:28
bool rawMode
Definition nvx3streamreader.h:125
virtual void Close()
end reading from the stream, destroys loaded objects
Definition nvx3streamreader.cc:90
SizeT vertexDataSize
Definition nvx3streamreader.h:138
void * vertexDataPtr
Definition nvx3streamreader.h:134
__DeclareClass(Nvx3StreamReader)
void SetupIndexBuffer()
setup the index buffer object (not called in raw mode)
Definition nvx3streamreader.cc:290
void SetVertexBufferLoader(const Ptr< Base::MemoryVertexBufferLoaderBase > &vBufLoader)
set the specialized vertex buffer reader
Definition nvx3streamreader.h:162
void SetupVertexBuffer()
setup the vertex buffer object (not called in raw mode)
Definition nvx3streamreader.cc:260
Ptr< Base::VertexBufferBase > vertexBuffer
Definition nvx3streamreader.h:126
uint vertexComponentMask
Definition nvx3streamreader.h:145
uint numIndices
Definition nvx3streamreader.h:144
static void ConvertVertexBufferEndianess(void *vertexPtr, SizeT numVertices, const Util::Array< CoreGraphics::VertexComponent > &vertexComps)
helper method to convert vertex buffer endianess
SizeT groupDataSize
Definition nvx3streamreader.h:137
Util::Array< CoreGraphics::PrimitiveGroup > primGroups
Definition nvx3streamreader.h:131
Base::ResourceBase::Usage usage
Definition nvx3streamreader.h:122
N3VertexComponent
Nebula vertex components, see Nebula's class for details.
Definition nvx3streamreader.h:95
@ N3Coord
Definition nvx3streamreader.h:96
@ N3Normal
Definition nvx3streamreader.h:97
@ N3Weights
Definition nvx3streamreader.h:113
@ N3TangentUB4N
Definition nvx3streamreader.h:110
@ N3Uv2S2
Definition nvx3streamreader.h:104
@ N3JIndices
Definition nvx3streamreader.h:115
@ N3Uv2
Definition nvx3streamreader.h:103
@ N3Uv3
Definition nvx3streamreader.h:105
@ N3Uv1S2
Definition nvx3streamreader.h:102
@ N3ColorUB4N
Definition nvx3streamreader.h:108
@ N3NormalUB4N
Definition nvx3streamreader.h:98
@ N3Uv3S2
Definition nvx3streamreader.h:106
@ N3NumVertexComponents
Definition nvx3streamreader.h:118
@ N3AllComponents
Definition nvx3streamreader.h:119
@ N3Uv1
Definition nvx3streamreader.h:101
@ N3WeightsUB4N
Definition nvx3streamreader.h:114
@ N3Tangent
Definition nvx3streamreader.h:109
@ N3Uv0S2
Definition nvx3streamreader.h:100
@ N3Color
Definition nvx3streamreader.h:107
@ N3Binormal
Definition nvx3streamreader.h:111
@ N3JIndicesUB4
Definition nvx3streamreader.h:116
@ N3Uv0
Definition nvx3streamreader.h:99
@ N3BinormalUB4N
Definition nvx3streamreader.h:112
void * indexDataPtr
Definition nvx3streamreader.h:135
void SetUsage(Base::ResourceBase::Usage usage)
set the intended resource usage (default is UsageImmutable)
Definition nvx3streamreader.h:272
Base::ResourceBase::Usage GetUsage() const
get resource usage
Definition nvx3streamreader.h:281
Ptr< Base::MemoryIndexBufferLoaderBase > indexBufferLoader
Definition nvx3streamreader.h:129
Base::ResourceBase::Access access
Definition nvx3streamreader.h:123
void SetAccess(Base::ResourceBase::Access access)
set the intended resource access (default is AccessNone)
Definition nvx3streamreader.h:290
void SetVertexBuffer(const Ptr< Base::VertexBufferBase > &vBuf)
set the specialized vertex buffer
Definition nvx3streamreader.h:153
const Ptr< Base::IndexBufferBase > & GetIndexBuffer() const
get index buffer (not valid in raw mode)
Definition nvx3streamreader.h:199
void ReadPrimitiveGroups()
read primitive groups from stream
Definition nvx3streamreader.cc:149
float * GetVertexData() const
get pointer to raw vertex data
Definition nvx3streamreader.h:218
virtual ~Nvx3StreamReader()
destructor
Definition nvx3streamreader.cc:47
SizeT indexDataSize
Definition nvx3streamreader.h:139
Util::Array< CoreGraphics::VertexComponent > vertexComponents
Definition nvx3streamreader.h:146
Nvx3StreamReader()
contructor
Definition nvx3streamreader.cc:24
uint numVertices
Definition nvx3streamreader.h:142
uint numGroups
Definition nvx3streamreader.h:141
uint vertexWidth
Definition nvx3streamreader.h:143
void * groupDataPtr
Definition nvx3streamreader.h:133
const Util::Array< CoreGraphics::PrimitiveGroup > & GetPrimitiveGroups() const
get primitive groups
Definition nvx3streamreader.h:209
SizeT GetVertexWidth() const
get vertex width
Definition nvx3streamreader.h:254
void UpdateGroupBoundingBoxes()
update primitive group bounding boxes
Definition nvx3streamreader.cc:230
void ReadHeaderData()
read header data from stream
Definition nvx3streamreader.cc:116
ushort * GetIndexData() const
get pointer to raw index data
Definition nvx3streamreader.h:227
Ptr< Base::MemoryVertexBufferLoaderBase > vertexBufferLoader
Definition nvx3streamreader.h:128
SizeT GetNumVertices() const
get number of vertices
Definition nvx3streamreader.h:236
const Ptr< Base::VertexBufferBase > & GetVertexBuffer() const
get vertex buffer (not valid in raw mode)
Definition nvx3streamreader.h:189
virtual bool Open()
begin reading from the stream, read entire data
Definition nvx3streamreader.cc:59
Ptr< Base::IndexBufferBase > indexBuffer
Definition nvx3streamreader.h:127
bool IsRawMode() const
get raw mode flag
Definition nvx3streamreader.h:180
void * mapPtr
Definition nvx3streamreader.h:132
void SetRawMode(bool b)
enable/disable raw mode (raw mode does not setup vertex/index buffers), default is false
Definition nvx3streamreader.h:171
Base::ResourceBase::Access GetAccess() const
get the resource access
Definition nvx3streamreader.h:299
SizeT GetNumIndices() const
get number of indices
Definition nvx3streamreader.h:245
void SetupVertexComponents()
setup vertex components array
Definition nvx3streamreader.cc:176
const Util::Array< CoreGraphics::VertexComponent > & GetVertexComponents() const
get vertex components
Definition nvx3streamreader.h:263
Stream reader classes provide a specialized read-interface for a stream.
Definition streamreader.h:24
Nebula's smart pointer class which manages the life time of RefCounted objects.
Definition ptr.h:38
bool isvalid() const
check if pointer is valid
Definition ptr.h:435
Nebula's dynamic array class.
Definition array.h:60
#define n_assert(exp)
Definition debug.h:50
Nebula compiler specific defines and configuration.
Acceleration structures are used to enable ray tracing on the GPU by dividing the scene into a BVH.
Definition accelerationstructure.h:24
int SizeT
Definition types.h:49
unsigned int uint
Definition types.h:31
unsigned short ushort
Definition types.h:32