Uses of Class
org.xjge.graphics.Color
Package | Description |
---|---|
org.xjge.core |
Contains various classes, objects, and utilities many of which are essential
to the function of the engine.
|
org.xjge.graphics |
Supplies abstractions of OpenGL into various objects and data structures to
be used by other parts of the engine.
|
-
Uses of Color in org.xjge.core
Fields in org.xjge.core declared as Color Modifier and Type Field Description Color
Light. ambientColor
Color
Light. diffuseColor
Color
Light. specularColor
Methods in org.xjge.core with parameters of type Color Modifier and Type Method Description protected void
Widget. drawString(Font font, java.lang.String text, org.joml.Vector2i position, Color color)
Draws a string of text to the screen.static void
Game. setClearColor(Color color)
Changes the color OpenGL will use to clear color buffers.protected void
TerminalCommand. setOutput(java.lang.String text, Color color)
Provides a response to the user upon executing a command.Constructors in org.xjge.core with parameters of type Color Constructor Description Light(float brightness, float contrast, float distance, org.joml.Vector3f position, Color color)
Variant ofLight(float,float,float,org.joml.Vector3f,org.xjge.graphics.Color,org.xjge.graphics.Color,org.xjge.graphics.Color)
that will initialize each color used in the Phong lighting model to the same value.Light(float brightness, float contrast, float distance, org.joml.Vector3f position, Color ambientColor, Color diffuseColor, Color specularColor)
Creates a new light object that contains data which can be used by a fragment shader during lighting calculations. -
Uses of Color in org.xjge.graphics
Fields in org.xjge.graphics declared as Color Modifier and Type Field Description static Color
Color. BLACK
static Color
Color. BLUE
static Color
Color. BROWN
Color
Icon. color
Color
Model. color
Color
Polygon. color
static Color
Color. CYAN
static Color
Color. GRAY
static Color
Color. GREEN
static Color
Color. LIME
static Color
Color. MAGENTA
static Color
Color. ORANGE
static Color
Color. PINK
static Color
Color. PURPLE
static Color
Color. RED
static Color
Color. SILVER
static Color
Color. TEAL
static Color
Color. WHITE
static Color
Color. YELLOW
Methods in org.xjge.graphics that return Color Modifier and Type Method Description static Color
Color. create(int r, int g, int b)
Creates a new color object using the values of the three RGB components supplied.static Color
Color. random()
Creates a random color.Methods in org.xjge.graphics with parameters of type Color Modifier and Type Method Description boolean
Color. compareTo(Color other)
Compares the RGB component values of this color to another.void
RectangleBatch. drawRectangle(int x, int y, int width, int height, Color color)
Draws a rectangle using the data provided.void
RectangleBatch. drawRectangle(org.joml.Vector2i pos, int width, int height, Color color)
Draws a rectangle using the data provided.void
RectangleBatch. drawRectangle(Rectangle rectangle, Color color)
Draws a rectangle using the data provided.void
Rectangle. render(float opacity, Color color)
A quick and dirty way to render a rectangle with little overhead.Constructors in org.xjge.graphics with parameters of type Color Constructor Description Polygon(int numSides, boolean fill, float radius, Color color, int xPos, int yPos)
Creates a new n-sided polygon object which can be used to represent regular shapes and circles.Polygon(int numSides, boolean fill, float radius, Color color, org.joml.Vector2i position)
Alternate version of thePolygon()
constructor.