AGXDynamics
2.35.0.3
Line.h
Go to the documentation of this file.
1
/*
2
Copyright 2007-2022. Algoryx Simulation AB.
3
4
All AGX source code, intellectual property, documentation, sample code,
5
tutorials, scene files and technical white papers, is copyrighted, proprietary
6
and confidential material of Algoryx Simulation AB. You may not download, read,
7
store, distribute, publish, copy or otherwise disseminate, use or expose this
8
material unless having a written signed agreement with Algoryx Simulation AB, or having been
9
advised so by Algoryx Simulation AB for a time limited evaluation, or having purchased a
10
valid commercial license from Algoryx Simulation AB.
11
12
Algoryx Simulation AB disclaims all responsibilities for loss or damage caused
13
from using this software, unless otherwise stated in written agreements with
14
Algoryx Simulation AB.
15
*/
16
17
#ifndef AGX_LINE_H
18
#define AGX_LINE_H
19
20
#include <
agx/Vec3.h
>
21
22
namespace
agx
23
{
24
template
<
typename
T>
25
class
LineT
26
{
27
public
:
28
typedef
T
Type
;
29
30
public
:
31
T
p1
;
32
T
p2
;
33
34
public
:
35
inline
LineT
() { }
36
inline
LineT
(
const
T& _p1,
const
T& _p2) :
p1
(_p1),
p2
(_p2) {}
37
};
38
39
typedef
LineT<Vec3>
Line
;
40
typedef
LineT<Vec3f>
Line32
;
41
typedef
LineT<Vec3d>
Line64
;
42
43
44
template
<
typename
T>
45
std::ostream&
operator<<
(std::ostream& output,
const
LineT<T>
& line)
46
{
47
output << line.
p1
<<
"->"
<< line.
p2
;
48
return
output;
49
}
50
}
51
52
AGX_TYPE_BINDING
(
agx::Line32
,
"Line"
)
53
AGX_TYPE_BINDING
(
agx
::
Line64
, "
Line
")
54
55
#endif
56
57
agx::Line64
LineT< Vec3d > Line64
Definition:
Line.h:41
agx::LineT::p1
T p1
Definition:
Line.h:31
agx::LineT::LineT
LineT()
Definition:
Line.h:35
agx::Line32
LineT< Vec3f > Line32
Definition:
Line.h:40
agx::LineT::p2
T p2
Definition:
Line.h:32
agx::LineT::Type
T Type
Definition:
Line.h:28
agx
The agx namespace contains the dynamics/math part of the AGX Dynamics API.
Definition:
AddedMassInteraction.h:22
agx::operator<<
std::ostream & operator<<(std::ostream &stream, const AtomicValueT< T > &value)
Definition:
AtomicValue.h:109
Vec3.h
agx::LineT
Definition:
Line.h:25
agx::Line
LineT< Vec3 > Line
Definition:
Line.h:39
agx::LineT::LineT
LineT(const T &_p1, const T &_p2)
Definition:
Line.h:36
AGX_TYPE_BINDING
#define AGX_TYPE_BINDING(_Type, _Name)
Definition:
Type.h:179
include
agx
Line.h
Generated on Fri Feb 10 2023 14:06:11 for AGXDynamics by
1.8.17