32 #ifndef DaHelpers_INCLUDE_ONCE 33 #define DaHelpers_INCLUDE_ONCE 37 #pragma warning(disable:4100) 38 #pragma warning(disable:4355) 39 #pragma warning(disable:4512) 42 #include <dae/domAny.h> 44 #include <dom/domCOLLADA.h> 45 #include <dom/domProfile_COMMON.h> 47 #pragma warning(default:4100) 48 #pragma warning(default:4355) 49 #pragma warning(default:4512) 138 void init(domFloat_arrayRef data_src, domUint count, domUint stride, domUint offset,
size_t fields_mask)
140 mFloatSource = data_src;
143 mCount = (size_t)count;
144 mStride = (size_t)stride;
145 mOffset = (size_t)offset;
146 mFieldsMask = fields_mask;
150 for(
size_t i=0; i<32; ++i)
151 if (mFieldsMask & (1<<i))
156 void init(domInt_arrayRef data_src, domUint count, domUint stride, domUint offset,
size_t fields_mask)
159 mIntSource = data_src;
161 mCount = (size_t)count;
162 mStride = (size_t)stride;
163 mOffset = (size_t)offset;
164 mFieldsMask = fields_mask;
168 for(
size_t i=0; i<32; ++i)
169 if (mFieldsMask & (1<<i))
174 void init(domBool_arrayRef data_src, domUint count, domUint stride, domUint offset,
size_t fields_mask)
178 mBoolSource = data_src;
179 mCount = (size_t)count;
180 mStride = (size_t)stride;
181 mOffset = (size_t)offset;
182 mFieldsMask = fields_mask;
186 for(
size_t i=0; i<32; ++i)
187 if (mFieldsMask & (1<<i))
194 size_t read_pos = mOffset + n * mStride;
200 VL_CHECK( (n < mCount) || (read_pos < mFloatSource->getValue().getCount() - mDataSize) )
201 for(
size_t i=0; i<32 && i<mStride; ++i)
202 if (mFieldsMask & (1<<i))
203 output[pos++] = (float)mFloatSource->getValue()[read_pos+i];
208 VL_CHECK( (n < mCount) || (read_pos < mIntSource->getValue().getCount() - mDataSize) )
209 for(
size_t i=0; i<32 && i<mStride; ++i)
210 if (mFieldsMask & (1<<i))
211 output[pos++] = (float)mIntSource->getValue()[read_pos+i];
216 VL_CHECK( (n < mCount) || (read_pos < mBoolSource->getValue().getCount() - mDataSize) )
217 for(
size_t i=0; i<32 && i<mStride; ++i)
218 if (mFieldsMask & (1<<i))
219 output[pos++] = (float)mBoolSource->getValue()[read_pos+i];
224 size_t count()
const {
return mCount; }
270 std::vector<domPRef>
mP;
292 std::vector< ref<Dae::Mesh> >
mMesh;
347 mEmission.mColor =
fvec4(0, 0, 0, 1);
348 mAmbient.mColor =
fvec4(0, 0, 0, 1);
349 mDiffuse.mColor =
fvec4(1, 0, 1, 1);
350 mSpecular.mColor =
fvec4(0, 0, 0, 1);
353 mReflective.mColor =
fvec4(1, 1, 1, 1);
356 mTransparent.mColor =
fvec4(0, 0, 0, 1);
360 mIndexOfRefraction = 0;
365 enum {
Unknown, Blinn, Phong, Lambert } mMode;
387 mDoubleSided =
false;
void init(domBool_arrayRef data_src, domUint count, domUint stride, domUint offset, size_t fields_mask)
Initializes an accessor. An accessor can read only up to 32 floats.
COLLADA common technique.
size_t mAttribIndex[MAX_ATTRIBS]
ref< Dae::Surface > mDaeSurface
ref< Dae::TechniqueCOMMON > mDaeTechniqueCOMMON
std::vector< ref< Dae::Primitive > > mPrimitives
Vector4< float > fvec4
A 4 components vector with float precision.
std::vector< ref< Dae::Input > > mVertexInputs
Dae::ColorOrTexture mSpecular
Dae::ColorOrTexture mReflective
std::vector< ref< Dae::Node > > mChildren
std::vector< domPRef > mP
Dae::ColorOrTexture mDiffuse
ref< Geometry > mGeometry
std::vector< ref< Dae::NewParam > > mNewParams
ref< Dae::Surface > mDaeSurface
Visualization Library main namespace.
ref< Dae::Effect > mDaeEffect
COLLADA color or texture input.
Dae::EPrimitiveType mType
Dae::ColorOrTexture mEmission
The base class for all the reference counted objects.
ref< Dae::Sampler2D > mSampler
void readData(size_t n, float *output)
Reads an element of data at the n-th position and writes it into 'output'. The number of elements tha...
Implements the OpenGL Shading Language convenience functions for scalar and vector operations...
domInt_arrayRef mIntSource
void init(domFloat_arrayRef data_src, domUint count, domUint stride, domUint offset, size_t fields_mask)
Initializes an accessor. An accessor can read only up to 32 floats.
bool operator<(const Dae::Vert &other) const
std::vector< ref< Dae::Input > > mChannels
size_t dataSize() const
The number of elements written by readData().
vl::ETexParamFilter mMinFilter
std::vector< ref< Dae::Mesh > > mMesh
size_t count() const
The number of elements in the source.
Dae::ColorOrTexture mTransparent
ref< Transform > mTransform
vl::ETexParamFilter mMagFilter
The ref<> class is used to reference-count an Object.
Dae::ColorOrTexture mAmbient
static const int MAX_ATTRIBS
domFloat_arrayRef mFloatSource
void init(domInt_arrayRef data_src, domUint count, domUint stride, domUint offset, size_t fields_mask)
Initializes an accessor. An accessor can read only up to 32 floats.
std::vector< ref< Actor > > mActors
ref< Dae::Sampler2D > mDaeSampler2D
Dae::EOpaqueMode mOpaqueMode
domBool_arrayRef mBoolSource