Class SFML::Vector3
In: system/Vector3.cpp
Parent: Object

SFML::Vector3 is a simple class that defines a mathematical vector with three coordinates (x, y and z).

It can be used to represent anything that has three dimensions: a size, a point, a velocity, etc.

This class differs from the C++ version. It will accept any value that is Numeric and both x, y an z must be of the same class.

  v1 = SFML::Vector3.new(16.5, 24.0, -8.2)
  v1.z = 18.2
  y = v1.y

  v2 = v1 * v1;
  v3 = SFML::Vector3.new
  v3 = v1 + v2

  different = (v2 != v3);

Methods

*   +   -   -@   /   ==   eql?   new  

Attributes

x  [RW] 
y  [RW] 
z  [RW] 

Public Class methods

Public Instance methods

[Validate]