Divooka.Multimedia.Types

Divooka.Multimedia.Types.GeographicCoordinate

Fixed radius spherical geographc coordinate

Divooka.Multimedia.Types.GeographicCoordinate.EarthRadius

Earth's average radius in kilometers

Divooka.Multimedia.Types.GeographicCoordinate.Latitude

Latitude in degrees [-90, 90]

Divooka.Multimedia.Types.GeographicCoordinate.Longitude

Longitude in degrees [-180, 180]

Divooka.Multimedia.Types.GeographicCoordinate.Altitude

Altitude in kilometers above Earth's surface

Divooka.Multimedia.Types.GeographicCoordinate.#ctor()

Construct a coordinate.

Parameters

NameDescriptionDefault
latitude Latitude
longitude Longitutde
altitude Altitude
planetRadius Planet radius

Divooka.Multimedia.Types.GeographicCoordinate.ToSpherical

Converts the geographic coordinate to a spherical coordinate.

Divooka.Multimedia.Types.GeographicCoordinate.FromSpherical()

Constructs a GeographicCoordinate from a spherical coordinate.

Divooka.Multimedia.Types.GeographicCoordinate.ToCartesian

Converts the geographic coordinate to a Cartesian coordinate.

Divooka.Multimedia.Types.RectangleArea2D

Represents a two-dimensional rectangular area defined by an origin (X, Y) and a size (Width, Height).

Divooka.Multimedia.Types.RectangleArea2D.X

Gets the X-coordinate of the top-left corner of the rectangle.

Divooka.Multimedia.Types.RectangleArea2D.Y

Gets the Y-coordinate of the top-left corner of the rectangle.

Divooka.Multimedia.Types.RectangleArea2D.Width

Gets the width of the rectangle.

Divooka.Multimedia.Types.RectangleArea2D.Height

Gets the height of the rectangle.

Divooka.Multimedia.Types.RectangleArea2D.#ctor()

Initializes a new instance of Divooka.Multimedia.Types.RectangleArea2D with the specified origin and size.

Parameters

NameDescriptionDefault
x The X-coordinate of the top-left corner.
y The Y-coordinate of the top-left corner.
width The width of the rectangle (must be ≥ 0).
height The height of the rectangle (must be ≥ 0).

Divooka.Multimedia.Types.RectangleArea2D.Left

Gets the X-coordinate of the left edge (same as Divooka.Multimedia.Types.RectangleArea2D.X).

Divooka.Multimedia.Types.RectangleArea2D.Top

Gets the Y-coordinate of the top edge (same as Divooka.Multimedia.Types.RectangleArea2D.Y).

Divooka.Multimedia.Types.RectangleArea2D.Right

Divooka.Multimedia.Types.RectangleArea2D.Bottom

Divooka.Multimedia.Types.RectangleArea2D.Area

Divooka.Multimedia.Types.RectangleArea2D.Deconstruct()

Deconstructs the rectangle into its component values.

Parameters

NameDescriptionDefault
x The X-coordinate of the top-left corner.
y The Y-coordinate of the top-left corner.
width The width of the rectangle.
height The height of the rectangle.

Divooka.Multimedia.Types.RectangleArea2D.Contains()

Determines whether the specified point is inside this rectangle (edges inclusive).

Parameters

NameDescriptionDefault
x The X-coordinate of the point.
y The Y-coordinate of the point.

Returns

true if point is inside or on the edges; otherwise, false.

Divooka.Multimedia.Types.RectangleArea2D.Contains()

Determines whether the specified rectangle is entirely contained within this rectangle.

Parameters

NameDescriptionDefault
other The rectangle to test.

Returns

true if other lies fully inside; otherwise, false.

Divooka.Multimedia.Types.RectangleArea2D.IntersectsWith()

Determines whether this rectangle intersects with another.

Parameters

NameDescriptionDefault
other The rectangle to test.

Returns

true if there is any overlap; otherwise, false.

Divooka.Multimedia.Types.RectangleArea2D.Union()

Returns the minimal bounding rectangle that contains both this rectangle and another.

Parameters

NameDescriptionDefault
other The rectangle to union with.

Returns

Divooka.Multimedia.Types.RectangleArea2D.Offset()

Returns a new rectangle offset by the specified amounts.

Parameters

NameDescriptionDefault
offsetX Horizontal shift.
offsetY Vertical shift.

Returns

A new Divooka.Multimedia.Types.RectangleArea2D moved by the offsets.

Divooka.Multimedia.Types.RectangleArea2D.Equals()

Divooka.Multimedia.Types.RectangleArea2D.Equals()

Divooka.Multimedia.Types.RectangleArea2D.GetHashCode

Divooka.Multimedia.Types.RectangleArea2D.op_Equality()

Equality operator.

Divooka.Multimedia.Types.RectangleArea2D.op_Inequality()

Inequality operator.

Divooka.Multimedia.Types.RectangleArea2D.ToString

Divooka.Multimedia.Types.RectangleArea2D.Parse()

Parses the string representation of a Divooka.Multimedia.Types.RectangleArea2D.

Parameters

NameDescriptionDefault
s A string in the format "X={X}, Y={Y}, Width={Width}, Height={Height}".

Returns

Divooka.Multimedia.Types.RectangleArea2D.TryParse()

Tries to parse the string representation of a Divooka.Multimedia.Types.RectangleArea2D.

Parameters

NameDescriptionDefault
s A string in the format "X={X}, Y={Y}, Width={Width}, Height={Height}".
result When this method returns, contains the parsed Divooka.Multimedia.Types.RectangleArea2D if successful; otherwise, the default value.

Returns

true if parsing succeeded; otherwise, false.

Divooka.Multimedia.Types.RectangleArea2D.ParsePart()

Helper to extract a numeric value from a "Name=Value" segment.

Parameters

NameDescriptionDefault
segment The segment string (e.g. "X=10").
name The expected property name (e.g. "X").

Returns

The parsed System.Double value.

Divooka.Multimedia.Types.SphericalCoordinate3D

Represents a mathematical spherical coordinate.

Divooka.Multimedia.Types.SphericalCoordinate3D.R

Radial distance

Divooka.Multimedia.Types.SphericalCoordinate3D.Theta

Polar angle θ in radians [0, π]

Divooka.Multimedia.Types.SphericalCoordinate3D.Phi

Azimuthal angle φ in radians [0, 2π)

Divooka.Multimedia.Types.SphericalCoordinate3D.#ctor()

Construct from r, theta and phi.

Parameters

NameDescriptionDefault
r
theta
phi

Divooka.Multimedia.Types.SphericalCoordinate3D.#ctor()

Construct by converting from cartesian.

Parameters

NameDescriptionDefault
cartesian Cartesian coordinate.

Divooka.Multimedia.Types.SphericalCoordinate3D.ToCartesian

Converts the spherical coordinate to a Cartesian coordinate.

Divooka.Multimedia.Types.SphericalCoordinate3D.ToGeographic

Converts the spherical coordinate to a geographic coordinate.

Divooka.Multimedia.Types.SphericalCoordinate3D.ToString

Convert to friendly display.

Divooka.Multimedia.Types.Vector2D

Represents a 2D coordinate in double points. Specifically, it is used for representing node locations (from the DiDS perspective).

Divooka.Multimedia.Types.Vector2D.X

The X coordinate.

Divooka.Multimedia.Types.Vector2D.Y

The Y coordinate.

Divooka.Multimedia.Types.Vector2D.#ctor()

Initializes a new instance of the Divooka.Multimedia.Types.Vector2D struct with the specified coordinates.

Parameters

NameDescriptionDefault
x The X coordinate.
y The Y coordinate.

Divooka.Multimedia.Types.Vector2D.#ctor()

Initializes a new instance of the Divooka.Multimedia.Types.Vector2D struct using a System.Numerics.Vector2.

Parameters

NameDescriptionDefault
v A System.Numerics.Vector2 instance from which to initialize the coordinates.

Divooka.Multimedia.Types.Vector2D.Zero

Gets a Divooka.Multimedia.Types.Vector2D that has all of its values set to zero.

Divooka.Multimedia.Types.Vector2D.op_Addition()

Adds two Divooka.Multimedia.Types.Vector2D instances.

Parameters

NameDescriptionDefault
a The first Divooka.Multimedia.Types.Vector2D.
b The second Divooka.Multimedia.Types.Vector2D.

Returns

The sum of the two vectors.

Divooka.Multimedia.Types.Vector2D.op_Subtraction()

Subtracts one Divooka.Multimedia.Types.Vector2D from another.

Parameters

NameDescriptionDefault
a The first Divooka.Multimedia.Types.Vector2D.
b The second Divooka.Multimedia.Types.Vector2D to subtract from the first.

Returns

The result of the subtraction.

Divooka.Multimedia.Types.Vector2D.op_UnaryNegation()

Parameters

NameDescriptionDefault
a The Divooka.Multimedia.Types.Vector2D to negate.

Returns

A new Divooka.Multimedia.Types.Vector2D that is the negation of the original.

Divooka.Multimedia.Types.Vector2D.op_Multiply()

Multiplies a Divooka.Multimedia.Types.Vector2D by a scalar.

Parameters

NameDescriptionDefault
a The Divooka.Multimedia.Types.Vector2D to multiply.
b The scalar value.

Returns

Divooka.Multimedia.Types.Vector2D.op_Multiply()

Multiplies a scalar by a Divooka.Multimedia.Types.Vector2D.

Parameters

NameDescriptionDefault
a The scalar value.
b The Divooka.Multimedia.Types.Vector2D to multiply.

Returns

Divooka.Multimedia.Types.Vector2D.op_Division()

Divides a Divooka.Multimedia.Types.Vector2D by a scalar.

Parameters

NameDescriptionDefault
a The Divooka.Multimedia.Types.Vector2D to divide.
b The scalar value.

Returns

Divooka.Multimedia.Types.Vector2D.op_Equality()

Compares two Divooka.Multimedia.Types.Vector2D instances for equality.

Parameters

NameDescriptionDefault
a The first Divooka.Multimedia.Types.Vector2D.
b The second Divooka.Multimedia.Types.Vector2D.

Returns

true if both vectors have the same coordinates; otherwise, false.

Divooka.Multimedia.Types.Vector2D.op_Inequality()

Compares two Divooka.Multimedia.Types.Vector2D instances for inequality.

Parameters

NameDescriptionDefault
a The first Divooka.Multimedia.Types.Vector2D.
b The second Divooka.Multimedia.Types.Vector2D.

Returns

true if the vectors have different coordinates; otherwise, false.

Divooka.Multimedia.Types.Vector2D.Length

Gets the length (magnitude) of the vector.

Divooka.Multimedia.Types.Vector2D.LengthSquared

Calculates the square of the vector's length.

Returns

The squared length of the vector.

Divooka.Multimedia.Types.Vector2D.DistanceSquared()

Calculates the square of the distance between two vectors.

Parameters

NameDescriptionDefault
a The first Divooka.Multimedia.Types.Vector2D.
b The second Divooka.Multimedia.Types.Vector2D.

Returns

The squared distance between the two vectors.

Divooka.Multimedia.Types.Vector2D.Dot()

Calculates the dot product of two vectors.

Parameters

NameDescriptionDefault
a The first Divooka.Multimedia.Types.Vector2D.
b The second Divooka.Multimedia.Types.Vector2D.

Returns

The dot product of the two vectors.

Divooka.Multimedia.Types.Vector2DGeometryExtensions.CalculateTopLeftCorner()

Gets the top-left corner (min X, max Y) of the bounding box.

Divooka.Multimedia.Types.Vector2DGeometryExtensions.CalculateTopRightCorner()

Gets the top-right corner (max X, max Y).

Divooka.Multimedia.Types.Vector2DGeometryExtensions.CalculateBottomLeftCorner()

Gets the bottom-left corner (min X, min Y).

Divooka.Multimedia.Types.Vector2DGeometryExtensions.CalculateBottomRightCorner()

Gets the bottom-right corner (max X, min Y).

Divooka.Multimedia.Types.Vector2DGeometryExtensions.CalculateGeometryCenter()

Gets the center of the bounding box (½·(minX+maxX), ½·(minY+maxY)).

Divooka.Multimedia.Types.Vector2DGeometryExtensions.ComputeBounds()

Walks the positions once to find the four bounds.

Divooka.Multimedia.Types.Vector2DGeometryExtensions.ComputeBounds()

Walks the rectangles once to find the four bounds (min Left, max Right, min Top, max Bottom).

Divooka.Multimedia.Types.Vector2f

Represents a 2D coordinate with single precision.

Note: This type is obsolete. Use System.Numerics.Vector2 instead.

Divooka.Multimedia.Types.Vector2f.X

The X coordinate.

Divooka.Multimedia.Types.Vector2f.Y

The Y coordinate.

Divooka.Multimedia.Types.Vector2f.#ctor()

Initializes a new instance of the Divooka.Multimedia.Types.Vector2f struct with the specified coordinates.

Parameters

NameDescriptionDefault
x The X coordinate.
y The Y coordinate.

Divooka.Multimedia.Types.Vector2f.#ctor()

Initializes a new instance of the Divooka.Multimedia.Types.Vector2f struct using a System.Numerics.Vector2.

Parameters

NameDescriptionDefault
v A System.Numerics.Vector2 instance from which to initialize the coordinates.

Divooka.Multimedia.Types.Vector2f.op_Addition()

Adds two Divooka.Multimedia.Types.Vector2f instances.

Parameters

NameDescriptionDefault
a The first Divooka.Multimedia.Types.Vector2f.
b The second Divooka.Multimedia.Types.Vector2f.

Returns

The sum of the two vectors.

Divooka.Multimedia.Types.Vector2f.op_Subtraction()

Subtracts one Divooka.Multimedia.Types.Vector2f from another.

Parameters

NameDescriptionDefault
a The first Divooka.Multimedia.Types.Vector2f.
b The second Divooka.Multimedia.Types.Vector2f to subtract from the first.

Returns

The result of the subtraction.

Divooka.Multimedia.Types.Vector2f.op_Multiply()

Multiplies a Divooka.Multimedia.Types.Vector2f by a scalar.

Parameters

NameDescriptionDefault
a The Divooka.Multimedia.Types.Vector2f to multiply.
b The scalar value.

Returns

Divooka.Multimedia.Types.Vector2f.op_Division()

Divides a Divooka.Multimedia.Types.Vector2f by a scalar.

Parameters

NameDescriptionDefault
a The Divooka.Multimedia.Types.Vector2f to divide.
b The scalar value.

Returns

Divooka.Multimedia.Types.Vector3D

Double point vectors. Represents a 3D coordinate in double points. Specifically it's used for representing vectors in 3D geometric space.

Remarks

We have three different vector coordinate systems involved (likely more depending on assets): 1. The Matrix Official Coordinate System (This if from treating SFML as top view): Left-handed, +Z axis outwards up, +X towards right, +Y points down. +X is the assumed "forward" direction of things. 2. Blender/OSPRay Coordinate System: Right-handed +Z up, +Y towards right, +X towards viewer (outwards monitor); Notice we always calls +X as "forward", however in Blender's interface, +Y is considered "forward" (this becomes relevant when we export Objs - structure the object as seen in real world, putting its face forwarding +Y, then during export as obj, choose +Z up and +Y forward) 3. glTF/OpenGL: right-handed, +Y up, +X towards right, +Z towards viewer; geometries measured in meters. obj: arbitrary A simple rule regarding import/export between various tools (Blender, The Matrix/RTS, OSPRay, OpenGL, GLTF, Obj): 1. For all right-handed systems, "up" is whatever you see and should be interpreted as up (+Z in Blender, +Z in OSPRay, +Y in GLTF/OpenGL) 2. No matter handedness, we always treat +X as "forward" or the front of an object.

Divooka.Multimedia.Types.Vector3D.X

The X component of the vector.

Divooka.Multimedia.Types.Vector3D.Y

The Y component of the vector.

Divooka.Multimedia.Types.Vector3D.Z

The Z component of the vector.

Divooka.Multimedia.Types.Vector3D.#ctor()

Initializes a new instance of the Divooka.Multimedia.Types.Vector3D struct with the specified components.

Parameters

NameDescriptionDefault
x The X component.
y The Y component.
z The Z component.

Divooka.Multimedia.Types.Vector3D.#ctor()

Initializes a new instance of the Divooka.Multimedia.Types.Vector3D struct with all components set to the specified integer value.

Parameters

NameDescriptionDefault
value The value to assign to X, Y, and Z.

Divooka.Multimedia.Types.Vector3D.#ctor()

Initializes a new instance of the Divooka.Multimedia.Types.Vector3D struct from a System.Numerics.Vector3.

Parameters

NameDescriptionDefault
vf The System.Numerics.Vector3 instance from which to initialize.

Divooka.Multimedia.Types.Vector3D.Origin

Gets a vector representing the origin (0, 0, 0).

Divooka.Multimedia.Types.Vector3D.UnitX

Gets a unit vector in the X direction.

Divooka.Multimedia.Types.Vector3D.UnitY

Gets a unit vector in the Y direction.

Divooka.Multimedia.Types.Vector3D.UnitZ

Gets a unit vector in the Z direction.

Divooka.Multimedia.Types.Vector3D.Item()

Gets the vector component at the specified index.

Parameters

NameDescriptionDefault
index The index (0 for X, 1 for Y, 2 for Z).

Returns

The component value.

Divooka.Multimedia.Types.Vector3D.op_Addition()

Adds two vectors.

Parameters

NameDescriptionDefault
a The first vector.
b The second vector.

Returns

The vector sum.

Divooka.Multimedia.Types.Vector3D.op_Subtraction()

Subtracts one vector from another.

Parameters

NameDescriptionDefault
a The vector to subtract from.
b The vector to subtract.

Returns

The vector difference.

Divooka.Multimedia.Types.Vector3D.op_UnaryNegation()

Negates a vector.

Parameters

NameDescriptionDefault
a The vector to negate.

Returns

The negated vector.

Divooka.Multimedia.Types.Vector3D.op_Multiply()

Multiplies a vector by a scalar.

Parameters

NameDescriptionDefault
a The vector.
b The scalar value.

Returns

The scaled vector.

Divooka.Multimedia.Types.Vector3D.op_Division()

Divides a vector by a scalar.

Parameters

NameDescriptionDefault
a The vector.
b The scalar divisor.

Returns

The scaled vector.

Divooka.Multimedia.Types.Vector3D.op_Multiply()

Multiplies a scalar by a vector.

Parameters

NameDescriptionDefault
b The scalar value.
a The vector.

Returns

The scaled vector.

Divooka.Multimedia.Types.Vector3D.op_Division()

Divides a scalar by a vector (component-wise division).

Parameters

NameDescriptionDefault
b The scalar numerator.
a The vector denominator.

Returns

The vector resulting from the division.

Divooka.Multimedia.Types.Vector3D.op_Multiply()

Computes the dot product of two vectors.

Parameters

NameDescriptionDefault
a The first vector.
b The second vector.

Returns

The dot product.

Divooka.Multimedia.Types.Vector3D.Dot()

Computes the dot product of this vector with another.

Parameters

NameDescriptionDefault
other The other vector.

Returns

The dot product as a double.

Divooka.Multimedia.Types.Vector3D.Length

Gets the length (magnitude) of the vector.

Divooka.Multimedia.Types.Vector3D.Magnitude

Gets the magnitude of the vector.

Divooka.Multimedia.Types.Vector3D.Norm

Computes the norm (magnitude) of the vector.

Returns

The norm as a double.

Divooka.Multimedia.Types.Vector3D.Distance

Computes the distance of the vector from the origin.

Returns

The distance as a double.

Divooka.Multimedia.Types.Vector3D.Normalize

Returns a normalized version of the vector.

Returns

The normalized (unit length) vector.

Divooka.Multimedia.Types.Vector3D.Cross()

Computes the cross product of this vector with another using the right-hand rule.

Parameters

NameDescriptionDefault
other The other vector.

Returns

The cross product vector.

Divooka.Multimedia.Types.Vector3D.RotateX()

Rotates the vector around the X-axis by a specified angle in radians.

Parameters

NameDescriptionDefault
radians The rotation angle in radians.

Returns

The rotated vector.

Divooka.Multimedia.Types.Vector3D.RotateY()

Rotates the vector around the Y-axis by a specified angle in radians.

Parameters

NameDescriptionDefault
radians The rotation angle in radians.

Returns

The rotated vector.

Divooka.Multimedia.Types.Vector3D.RotateZ()

Rotates the vector around the Z-axis by a specified angle in radians.

Parameters

NameDescriptionDefault
radians The rotation angle in radians.

Returns

The rotated vector.

Divooka.Multimedia.Types.Vector3D.ToSpherical

Converts this Cartesian coordinate to a spherical coordinate.

Returns

A Divooka.Multimedia.Types.SphericalCoordinate3D representing the spherical coordinates.

Divooka.Multimedia.Types.Vector3D.#ctor()

Initializes a new instance of the Divooka.Multimedia.Types.Vector3D struct from a spherical coordinate.

Parameters

NameDescriptionDefault
spherical A Divooka.Multimedia.Types.SphericalCoordinate3D containing the spherical coordinates.

Divooka.Multimedia.Types.Vector3D.#ctor()

Initializes a new instance of the Divooka.Multimedia.Types.Vector3D struct from a geographic coordinate.

Parameters

NameDescriptionDefault
geo A Divooka.Multimedia.Types.GeographicCoordinate representing the geographic coordinate.

Divooka.Multimedia.Types.Vector3D.ToGeographic

Converts this Cartesian coordinate to a geographic coordinate.

Returns

A Divooka.Multimedia.Types.GeographicCoordinate corresponding to this vector.

Divooka.Multimedia.Types.Vector3D.ToString

Returns a string representation of the vector.

Returns

A string in the format "(X, Y, Z)".

Divooka.Multimedia.Types.Vector3i

Represents a 3D vector using integer-precision values.

Divooka.Multimedia.Types.Extent3D

Represents a 3D extension. Specifically it's used for representing vectors in 3D geometric space (with a semantic twist.

Divooka.Multimedia.Types.Extent3D.#ctor()

Represents a 3D extension. Specifically it's used for representing vectors in 3D geometric space (with a semantic twist.

Divooka.Multimedia.Types.Extent3D.Width

X

Divooka.Multimedia.Types.Extent3D.Height

Y

Divooka.Multimedia.Types.Extent3D.Depth

Z