commit
7e06c401f0
|
@ -53,7 +53,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
# include <math.h>
|
# include <math.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "./Compiler/pushpack1.h"
|
|
||||||
#include "defs.h"
|
#include "defs.h"
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------------
|
||||||
|
@ -62,24 +61,18 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
template <typename TReal>
|
template <typename TReal>
|
||||||
class aiVector2t
|
class aiVector2t {
|
||||||
{
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
aiVector2t () : x(), y() {}
|
aiVector2t () : x(), y() {}
|
||||||
aiVector2t (TReal _x, TReal _y) : x(_x), y(_y) {}
|
aiVector2t (TReal _x, TReal _y) : x(_x), y(_y) {}
|
||||||
explicit aiVector2t (TReal _xyz) : x(_xyz), y(_xyz) {}
|
explicit aiVector2t (TReal _xyz) : x(_xyz), y(_xyz) {}
|
||||||
aiVector2t (const aiVector2t& o) = default;
|
aiVector2t (const aiVector2t& o) = default;
|
||||||
|
|
||||||
public:
|
|
||||||
|
|
||||||
void Set( TReal pX, TReal pY);
|
void Set( TReal pX, TReal pY);
|
||||||
TReal SquareLength() const ;
|
TReal SquareLength() const ;
|
||||||
TReal Length() const ;
|
TReal Length() const ;
|
||||||
aiVector2t& Normalize();
|
aiVector2t& Normalize();
|
||||||
|
|
||||||
public:
|
|
||||||
|
|
||||||
const aiVector2t& operator += (const aiVector2t& o);
|
const aiVector2t& operator += (const aiVector2t& o);
|
||||||
const aiVector2t& operator -= (const aiVector2t& o);
|
const aiVector2t& operator -= (const aiVector2t& o);
|
||||||
const aiVector2t& operator *= (TReal f);
|
const aiVector2t& operator *= (TReal f);
|
||||||
|
@ -111,6 +104,4 @@ struct aiVector2D {
|
||||||
|
|
||||||
#endif // __cplusplus
|
#endif // __cplusplus
|
||||||
|
|
||||||
#include "./Compiler/poppack1.h"
|
|
||||||
|
|
||||||
#endif // AI_VECTOR2D_H_INC
|
#endif // AI_VECTOR2D_H_INC
|
||||||
|
|
Loading…
Reference in New Issue