예제 #1
0
const JVector&
J3DTriangle::GetVertex
(
    const JIndex index
)
const
{
    assert( IndexValid(index) );
    return *itsVertex [ index-1 ];
}
예제 #2
0
JColorIndex
J3DTriangle::GetVertexColor
(
    const JIndex index
)
const
{
    assert( IndexValid(index) );
    return itsVertexColor [ index-1 ];
}
예제 #3
0
void
J3DTriangle::SetVertex
(
    const JIndex	index,
    const JVector&	vertex
)
{
    assert( IndexValid(index) );
    *itsVertex [ index-1 ] = vertex;
    Refresh();
}
예제 #4
0
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;
		}
}
예제 #7
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();
}
예제 #8
0
파일: util.hpp 프로젝트: koxa29/realm-java
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);
}
예제 #9
0
파일: util.hpp 프로젝트: koxa29/realm-java
inline bool TblIndexValid(JNIEnv* env, T* pTable, jlong columnIndex, jlong rowIndex)
{
    return TableIsValid(env, pTable)
        && IndexValid(env, pTable, columnIndex, rowIndex);
}