*/
inline VrmlData_ArrayVec3d (const VrmlData_Scene& theScene,
const char * theName,
- const size_t nVec,
+ const Standard_Size nVec,
const gp_XYZ * arrVec)
: VrmlData_Node (theScene, theName),
myArray (arrVec),
/**
* Query the number of vectors
*/
- inline size_t Length () const { return myLength; }
+ inline Standard_Size Length () const { return myLength; }
/**
* Query the array
/**
* Set the array data
*/
- inline void SetValues (const size_t nValues,
+ inline void SetValues (const Standard_Size nValues,
const gp_XYZ * arrValues)
{ myLength = nValues; myArray = arrValues; }
* @return
* the vector for the index. If index irrelevant, returns (0., 0., 0.)
*/
- Standard_EXPORT const gp_XYZ& Value (const Standard_Integer i) const;
+ Standard_EXPORT const gp_XYZ& Value (const Standard_Size i) const;
protected:
// ---------- PROTECTED FIELDS ----------
//purpose :
//=======================================================================
-const gp_XYZ& VrmlData_ArrayVec3d::Value (const Standard_Integer i) const
+const gp_XYZ& VrmlData_ArrayVec3d::Value (const Standard_Size i) const
{
- size_t anIndex = (size_t)i;
- if (anIndex < 0 || anIndex >= myLength) {
- static gp_XYZ anOrigin (0., 0., 0.);
- return anOrigin;
- }
- return myArray[i];
+ static gp_XYZ anOrigin (0., 0., 0.);
+ return i < myLength ? myArray[i] : anOrigin;
}
//=======================================================================