38 mesh.
getBBox(m_AABBMin, m_AABBMax);
72 for (
int i = 0; i < m_numVertices; i++)
83 for (
int submesh = 0; submesh < meshP.
numSubmeshes(); submesh++)
88 m_texture->
addTexture(material.
textures[MeshBase::TextureType::TextureType_Diffuse], 0);
91 matInfo[submesh].w = 1.0f;
96 matInfo[submesh].w = 0.0f;
105 for (
int submesh = 0; submesh < meshP.
numSubmeshes(); submesh++)
112 for (
int i = 0; i < indices.
getSize(); i++)
114 const Vec3i& vi = indices[i];
118 *triNormal++ = normal;
119 *triMaterialColor++ = colorU32;
120 *triShadedColor++ =
Vec4f(colorVec3f * (
dot(normal, light) * 0.5
f + 0.5
f), 1.0
f).
toABGR();
124 if(material.
textures[MeshBase::TextureType::TextureType_Diffuse] !=
NULL)
131 *texInfo++ =
Vec4f(0.0
f, 0.0
f, 0.0
f, 0.0
f);
148 for (
int submesh = 0; submesh < meshP.
numSubmeshes(); submesh++)
153 for (
int i = 0; i < indices.
getSize(); i++)
157 const Vec3i& vi = indices[i];
159 *emissiveTris++ = vi;
U32 hashBuffer(const void *ptr, int size)
void getBBox(Vec3f &lo, Vec3f &hi) const
const Image * getImage(void) const
Scene(const MeshBase &mesh)
Constructor.
Vec2f getTextureSizeF(const Texture &tex)
int numSubmeshes(void) const
FW_CUDA_FUNC Vec3f getXYZ(void) const
const Material & material(int submesh) const
Vec2f getTexturePosF(const Texture &tex)
bool addTexture(const Texture &tex, int border=1, bool wrap=true)
const U8 * getPtr(S64 ofs=0)
FW_CUDA_FUNC T dot(const VectorBase< T, L, S > &a, const VectorBase< T, L, V > &b)
CUdevice int ordinal char int CUdevice dev CUdevprop CUdevice dev CUcontext ctx CUcontext ctx CUcontext pctx CUmodule const void image CUmodule const void fatCubin CUfunction CUmodule const char name void p CUfunction unsigned int bytes CUtexref pTexRef CUtexref CUarray unsigned int Flags CUtexref int CUaddress_mode am CUtexref unsigned int Flags CUaddress_mode CUtexref int dim CUarray_format int CUtexref hTexRef CUfunction unsigned int numbytes CUfunction int float value CUfunction int CUtexref hTexRef CUfunction int int grid_height CUevent unsigned int Flags CUevent hEvent CUevent hEvent CUstream unsigned int Flags CUstream hStream GLuint bufferobj unsigned int CUdevice dev CUdeviceptr unsigned int CUmodule const char name CUdeviceptr unsigned int bytesize CUdeviceptr dptr void unsigned int bytesize void CUdeviceptr unsigned int ByteCount CUarray unsigned int CUdeviceptr unsigned int ByteCount CUarray unsigned int const void unsigned int ByteCount CUarray unsigned int CUarray unsigned int unsigned int ByteCount void CUarray unsigned int unsigned int CUstream hStream const CUDA_MEMCPY2D pCopy CUdeviceptr const void unsigned int CUstream hStream const CUDA_MEMCPY2D CUstream hStream CUdeviceptr unsigned char unsigned int N CUdeviceptr unsigned int unsigned int N CUdeviceptr unsigned int unsigned short unsigned int unsigned int Height CUarray const CUDA_ARRAY_DESCRIPTOR pAllocateArray CUarray const CUDA_ARRAY3D_DESCRIPTOR pAllocateArray unsigned int CUtexref CUdeviceptr unsigned int bytes CUcontext unsigned int CUdevice device GLenum texture GLenum GLuint buffer GLenum GLuint renderbuffer GLenum GLsizeiptr const GLvoid GLenum usage GLuint shader GLenum type GLsizei const GLuint framebuffers GLsizei const GLuint renderbuffers GLuint v
U8 * getMutablePtr(S64 ofs=0)
const V * getVertexPtr(int idx=0) const
int numVertices(void) const
U32 hashBits(U32 a, U32 b=FW_HASH_MAGIC, U32 c=0)
CUdevice int ordinal char int CUdevice dev CUdevprop CUdevice dev CUcontext ctx CUcontext ctx CUcontext pctx CUmodule const void image CUmodule const void fatCubin CUfunction CUmodule const char name void p CUfunction unsigned int bytes CUtexref pTexRef CUtexref CUarray unsigned int Flags CUtexref int CUaddress_mode am CUtexref unsigned int Flags CUaddress_mode CUtexref int dim CUarray_format int CUtexref hTexRef CUfunction unsigned int numbytes CUfunction int float value CUfunction int CUtexref hTexRef CUfunction f
FW_CUDA_FUNC F32 cross(const Vec2f &a, const Vec2f &b)
const Array< Vec3i > & indices(int submesh) const
Texture textures[TextureType_Max]
FW_CUDA_FUNC S normalize(const VectorBase< T, L, S > &v, T len=(T) 1)
int numTriangles(void) const
FW_CUDA_FUNC S normalized(T len=(T) 1) const
void resizeDiscard(S64 size)