const JVector& J3DTriangle::GetVertex ( const JIndex index ) const { assert( IndexValid(index) ); return *itsVertex [ index-1 ]; }
JColorIndex J3DTriangle::GetVertexColor ( const JIndex index ) const { assert( IndexValid(index) ); return itsVertexColor [ index-1 ]; }
void J3DTriangle::SetVertex ( const JIndex index, const JVector& vertex ) { assert( IndexValid(index) ); *itsVertex [ index-1 ] = vertex; Refresh(); }
void J3DTriangle::SetVertexColor ( const JIndex index, const JColorIndex color ) { assert( IndexValid(index) ); itsVertexColor [ index-1 ] = color; Refresh(); }
void JDiagBandMatrix::SetElement ( const JIndex rowIndex, const JIndex columnIndex, const JFloat value ) { assert( IndexValid(rowIndex) && IndexValid(columnIndex) ); if (columnIndex - itsUpperBandCount <= rowIndex && rowIndex <= columnIndex + itsLowerBandCount) { Band* band = itsBands->NthElement(itsLowerBandCount+1+columnIndex-rowIndex); band->SetElement(columnIndex, value); } else { assert( 0 ); // operation not allowed yet } }
JFloat JDiagBandMatrix::GetElement ( const JIndex rowIndex, const JIndex columnIndex ) const { assert( IndexValid(rowIndex) && IndexValid(columnIndex) ); if (columnIndex - itsUpperBandCount <= rowIndex && rowIndex <= columnIndex + itsLowerBandCount) { Band* band = itsBands->NthElement(itsLowerBandCount+1+columnIndex-rowIndex); return band->GetElement(columnIndex); } else { return 0.0; } }
void J3DTriangle::SetVertex ( const JIndex index, const JFloat x, const JFloat y, const JFloat z ) { assert( IndexValid(index) ); itsVertex [ index-1 ] -> Set(x,y,z); Refresh(); }
inline bool IndexAndTypeValid(JNIEnv* env, T* pTable, jlong columnIndex, jlong rowIndex, int expectColType, bool allowMixed) { return IndexValid(env, pTable, columnIndex, rowIndex) && TypeValid(env, pTable, columnIndex, rowIndex, expectColType, allowMixed); }
inline bool TblIndexValid(JNIEnv* env, T* pTable, jlong columnIndex, jlong rowIndex) { return TableIsValid(env, pTable) && IndexValid(env, pTable, columnIndex, rowIndex); }