Infinity Engine v0.6.20
C++ API Documentation
Loading...
Searching...
No Matches
Infinity::Types::Core Namespace Reference

Classes

class  Base
 Abstract base class for all Infinity Engine data types. More...
 
class  Data
 Base class for complex data types with memory wrapping and property support. More...
 
class  IOStreamLegible
 Interface for types that support single-line text representation. More...
 
class  Pair
 Generic container for holding two related values of potentially different types. More...
 
class  PropertyValue
 
class  Value
 Template wrapper for primitive types to integrate with the Infinity type system. More...
 

Typedefs

using Edge2D = Infinity::Types::Core::Pair< Infinity::Types::Math::Vector2, Infinity::Types::Math::Vector2 >
 Type alias for a 2D edge represented as a pair of Vector2 points.
 
using Edge = Infinity::Types::Core::Pair< Infinity::Types::Math::Vector3, Infinity::Types::Math::Vector3 >
 Type alias for a 3D edge represented as a pair of Vector3 points.
 

Functions

std::ostream & operator<< (std::ostream &out, const Infinity::Types::Core::Base *&v)
 Stream insertion operator for Base pointers.
 
std::istream & operator>> (std::istream &in, Infinity::Types::Core::Base *&v)
 Stream extraction operator for Base pointers.
 
template<typename T >
INFINITY_API_TEMPLATE std::ostream & operator<< (std::ostream &out, const Value< T > &v)
 Stream insertion operator for Value<T>.
 
template<typename T >
INFINITY_API_TEMPLATE std::istream & operator>> (std::istream &in, Value< T > &v)
 Stream extraction operator for Value<T>.
 

Typedef Documentation

◆ Edge

Type alias for a 3D edge represented as a pair of Vector3 points.

Represents an edge or line segment in 3D space, defined by a start and end point. Commonly used in:

  • 3D mesh topology (storing mesh edges)
  • Graph-based procedural generation
  • Pathfinding and navigation meshes
  • Skeletal animation rigs (bones)
  • Physics constraint systems
  • 3D geometry algorithms
Edge edge(Math::Vector3(0, 0, 0), Math::Vector3(1, 2, 3));
Math::Vector3 start = edge.first();
Math::Vector3 end = edge.second();
Math::Vector3 direction = end - start;
float length = direction.length();
Generic container for holding two related values of potentially different types.
Definition Pair.hpp:76
Template structure representing a 3-component vector.
Definition Vector3.hpp:82
float length() const
Computes the length (magnitude) of this vector.
Definition Vector3.hpp:389

◆ Edge2D

Type alias for a 2D edge represented as a pair of Vector2 points.

Represents an edge or line segment in 2D space, defined by a start and end point. Commonly used in:

  • 2D mesh generation and triangulation
  • Polygon edge lists
  • 2D pathfinding and navigation
  • UI/diagram generation
  • 2D geometry algorithms
Edge2D edge(Math::Vector2(0, 0), Math::Vector2(10, 5));
Math::Vector2 start = edge.first();
Math::Vector2 end = edge.second();
float length = (end - start).length();
Template structure representing a 2-component vector.
Definition Vector2.hpp:75

Function Documentation

◆ operator<<() [1/2]

std::ostream & Infinity::Types::Core::operator<< ( std::ostream &  out,
const Infinity::Types::Core::Base *&  v 
)
inline

Stream insertion operator for Base pointers.

No-op operator to prevent accidental output of pointer addresses when attempting to serialize Base* variables. Returns the stream unchanged.

Parameters
outOutput stream.
vPointer to Base object (unused).
Returns
Reference to the output stream unchanged.
Note
To serialize the pointed-to object, dereference first: out << *ptr;

◆ operator<<() [2/2]

template<typename T >
INFINITY_API_TEMPLATE std::ostream & Infinity::Types::Core::operator<< ( std::ostream &  out,
const Value< T > &  v 
)

Stream insertion operator for Value<T>.

Allows Value objects to be written to output streams using the operator. Outputs the underlying value directly.

Template Parameters
TThe wrapped type.
Parameters
outOutput stream.
vThe Value to output.
Returns
Reference to the output stream.
Value<int> count(42);
std::cout << "Count: " << count << std::endl; // Outputs: "Count: 42"
Template wrapper for primitive types to integrate with the Infinity type system.
Definition Value.hpp:89

◆ operator>>() [1/2]

std::istream & Infinity::Types::Core::operator>> ( std::istream &  in,
Infinity::Types::Core::Base *&  v 
)
inline

Stream extraction operator for Base pointers.

No-op operator to prevent accidental input into pointer variables. Returns the stream unchanged.

Parameters
inInput stream.
vPointer to Base object (unused).
Returns
Reference to the input stream unchanged.
Note
To deserialize into a pointed-to object, dereference first: in >> *ptr;

◆ operator>>() [2/2]

template<typename T >
INFINITY_API_TEMPLATE std::istream & Infinity::Types::Core::operator>> ( std::istream &  in,
Value< T > &  v 
)

Stream extraction operator for Value<T>.

Allows Value objects to be read from input streams using the >> operator. Reads into the underlying value directly.

Template Parameters
TThe wrapped type.
Parameters
inInput stream.
vThe Value to read into.
Returns
Reference to the input stream.
Value<int> count;
std::istringstream input("42");
input >> count; // count now contains 42