///////////////////////////////////////////////////////////////////////////////
// Copyright (C) 2002-2025, Open Design Alliance (the "Alliance").
// All rights reserved.
//
// This software and its documentation and related materials are owned by
// the Alliance. The software may only be incorporated into application
// programs owned by members of the Alliance, subject to a signed
// Membership Agreement and Supplemental Software License Agreement with the
// Alliance. The structure and organization of this software are the valuable
// trade secrets of the Alliance and its suppliers. The software is also
// protected by copyright law and international treaty provisions. Application
// programs incorporating this software must include the following statement
// with their copyright notices:
//
// This application incorporates Open Design Alliance software pursuant to a license
// agreement with Open Design Alliance.
// Open Design Alliance Copyright (C) 2002-2025 by Open Design Alliance.
// All rights reserved.
//
// By use of this software, its documentation or related materials, you
// acknowledge and accept the above terms.
///////////////////////////////////////////////////////////////////////////////
#ifndef _ODTV_SCENEIOBJECT_H_INCLUDED_
#define _ODTV_SCENEIOBJECT_H_INCLUDED_
#include "TvTraits.h"
/** \details
The abstract interface class for an object that supports work with transform.
*/
class ODTV_EXPORT OdTvSceneIObject : public OdTvTraitsIObject
{
public:
/** \details
Rotates the object around the X, Y and Z axes.
\param x [in] A rotation angle around the X-axis (in degrees).
\param y [in] A rotation angle around the Y-axis (in degrees).
\param z [in] A rotation angle around the Z-axis (in degrees).
\returns A value of the type that contains the result of the operation.
\remarks
If the object has been successfully rotated, the method returns tvOk; otherwise it returns an appropriate error code.
The method joins the appropriate rotation matrix to the object's transformation matrix.
*/
virtual OdTvResult rotate(double x, double y, double z) = 0;
/** \details
Rotates the object around a specified arbitrary vector.
\param aVector [in] An arbitrary vector.
\param ang [in] A rotation angle in degrees.
\param center [in] A rotation center point.
\returns A value of the type that contains the result of the operation.
\remarks
If the object has been successfully rotated, the method returns tvOk; otherwise it returns an appropriate error code.
The method joins the appropriate rotation matrix to the object's transformation matrix.
*/
virtual OdTvResult rotateAxis(const OdTvVector& aVector, double ang, const OdTvPoint& center = OdTvPoint::kOrigin) = 0;
/** \details
Moves the object geometry along the X, Y, Z axes.
\param x [in] A translation distance along the X-axis (in degrees).
\param y [in] A translation distance along the Y-axis (in degrees).
\param z [in] A translation distance along the Z-axis (in degrees).
\returns A value of the type that contains the result of the operation.
\remarks
If the object has been successfully moved, the method returns tvOk; otherwise it returns an appropriate error code.
The method joins the translation matrix to the object's transformation matrix.
*/
virtual OdTvResult translate(double x, double y, double z) = 0;
/** \details
Moves the object geometry along a specified vector for a distance that is equal to the vector length.
\param aVector [in] A translation vector.
\returns A value of the type that contains the result of the operation.
\remarks
If the object has been successfully moved, the method returns tvOk; otherwise it returns an appropriate error code.
The method joins the translation matrix to the object's transformation matrix.
*/
virtual OdTvResult translate(const OdTvVector& aVector) = 0;
/** \details
Scales the object along the X, Y and Z axes using specified multipliers.
\param x [in] A scale multiplier for the X-axis.
\param y [in] A scale multiplier for the Y-axis.
\param z [in] A scale multiplier for the Z-axis.
\returns A value of the type that contains the result of the operation.
\remarks
If the object has been successfully scaled, the method returns tvOk; otherwise it returns an appropriate error code.
The method joins the scaling matrix to the object's transformation matrix.
*/
virtual OdTvResult scale(double x, double y, double z) = 0;
/** \details
Sets a new transformation matrix that can rotate, translate (move) and scale the object.
\param matrix [in] A transformation matrix object.
\returns A value of the type that contains the result of the operation.
\remarks
If the transformation matrix has been successfully set, the method returns tvOk; otherwise it returns an appropriate error code.
*/
virtual OdTvResult setModelingMatrix(const OdTvMatrix& matrix) = 0;
/** \details
Retrieves the current transformation matrix for the object.
A transformation matrix can rotate, translate (move) and scale the object.
\param rc [out] A pointer to a value of type that contains the result of the operation.
\returns The transformation matrix represented as an instance of the class.
\remarks
If the rc parameter is not null and the transformation matrix has been successfully returned, the rc parameter accepts tvOk value; otherwise it contains an
appropriate error code.
*/
virtual OdTvMatrix getModelingMatrix(OdTvResult* rc = NULL) const = 0;
/** \details
Appends a new transformation matrix to the object.
Appending a new transformation matrix means that the new matrix and existing matrix will be multiplied.
\param matrix [in] A new transformation matrix object to append.
\returns A value of the type that contains the result of the operation.
\remarks
If the new transformation matrix has been successfully appended, the method returns tvOk; otherwise it returns an appropriate error code.
*/
virtual OdTvResult appendModelingMatrix(const OdTvMatrix& matrix) = 0;
};
/** \details
A data type that represents a smart pointer to an object.
*/
typedef OdTvSmartPtr OdTvSceneIObjectPtr;
#endif // _ODTV_SCENEIOBJECT_H_INCLUDED_