|
@@ -35,9 +35,22 @@ public:
|
|
|
* @param color Color of the light.
|
|
* @param color Color of the light.
|
|
|
*
|
|
*
|
|
|
* @return The new directional light.
|
|
* @return The new directional light.
|
|
|
|
|
+ * @script{create}
|
|
|
*/
|
|
*/
|
|
|
static Light* createDirectional(const Vector3& color);
|
|
static Light* createDirectional(const Vector3& color);
|
|
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
|
+ * Creates a directional light.
|
|
|
|
|
+ *
|
|
|
|
|
+ * @param red The red channel.
|
|
|
|
|
+ * @param green The green channel.
|
|
|
|
|
+ * @param blue The blue channel.
|
|
|
|
|
+ *
|
|
|
|
|
+ * @return The new directional light.
|
|
|
|
|
+ * @script{create}
|
|
|
|
|
+ */
|
|
|
|
|
+ static Light* createDirectional(float red, float green, float blue);
|
|
|
|
|
+
|
|
|
/**
|
|
/**
|
|
|
* Creates a point light.
|
|
* Creates a point light.
|
|
|
*
|
|
*
|
|
@@ -45,9 +58,23 @@ public:
|
|
|
* @param range The light's range.
|
|
* @param range The light's range.
|
|
|
*
|
|
*
|
|
|
* @return The new point light.
|
|
* @return The new point light.
|
|
|
|
|
+ * @script{create}
|
|
|
*/
|
|
*/
|
|
|
static Light* createPoint(const Vector3& color, float range);
|
|
static Light* createPoint(const Vector3& color, float range);
|
|
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
|
+ * Creates a point light.
|
|
|
|
|
+ *
|
|
|
|
|
+ * @param red The red channel.
|
|
|
|
|
+ * @param green The green channel.
|
|
|
|
|
+ * @param blue The blue channel.
|
|
|
|
|
+ * @param range The light's range.
|
|
|
|
|
+ *
|
|
|
|
|
+ * @return The new point light.
|
|
|
|
|
+ * @script{create}
|
|
|
|
|
+ */
|
|
|
|
|
+ static Light* createPoint(float red, float green, float blue, float range);
|
|
|
|
|
+
|
|
|
/**
|
|
/**
|
|
|
* Creates a spot light.
|
|
* Creates a spot light.
|
|
|
*
|
|
*
|
|
@@ -57,9 +84,25 @@ public:
|
|
|
* @param outerAngle The light's outer angle (in radians).
|
|
* @param outerAngle The light's outer angle (in radians).
|
|
|
*
|
|
*
|
|
|
* @return The new spot light.
|
|
* @return The new spot light.
|
|
|
|
|
+ * @script{create}
|
|
|
*/
|
|
*/
|
|
|
static Light* createSpot(const Vector3& color, float range, float innerAngle, float outerAngle);
|
|
static Light* createSpot(const Vector3& color, float range, float innerAngle, float outerAngle);
|
|
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
|
+ * Creates a spot light.
|
|
|
|
|
+ *
|
|
|
|
|
+ * @param red The red channel.
|
|
|
|
|
+ * @param green The green channel.
|
|
|
|
|
+ * @param blue The blue channel.
|
|
|
|
|
+ * @param range The light's range.
|
|
|
|
|
+ * @param innerAngle The light's inner angle (in radians).
|
|
|
|
|
+ * @param outerAngle The light's outer angle (in radians).
|
|
|
|
|
+ *
|
|
|
|
|
+ * @return The new spot light.
|
|
|
|
|
+ * @script{create}
|
|
|
|
|
+ */
|
|
|
|
|
+ static Light* createSpot(float red, float green, float blue, float range, float innerAngle, float outerAngle);
|
|
|
|
|
+
|
|
|
/**
|
|
/**
|
|
|
* Destructor.
|
|
* Destructor.
|
|
|
*/
|
|
*/
|
|
@@ -91,6 +134,15 @@ public:
|
|
|
*/
|
|
*/
|
|
|
void setColor(const Vector3& color);
|
|
void setColor(const Vector3& color);
|
|
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
|
+ * Sets the light color.
|
|
|
|
|
+ *
|
|
|
|
|
+ * @param red The red channel.
|
|
|
|
|
+ * @param green The green channel.
|
|
|
|
|
+ * @param blue The blue channel.
|
|
|
|
|
+ */
|
|
|
|
|
+ void setColor(float red, float green, float blue);
|
|
|
|
|
+
|
|
|
/**
|
|
/**
|
|
|
* Returns the node associated with this light.
|
|
* Returns the node associated with this light.
|
|
|
*
|
|
*
|