APIdia Launch Partner
Top Fields Constructors Methods
com.badlogic.gdx.graphics.g3d

public Class Material

extends Attributes
Class Inheritance
Imports
com.badlogic.gdx.utils.Array

Field Summary

Modifier and TypeField and Description
private static int
public String
Inherited from com.badlogic.gdx.graphics.g3d.Attributes:
attributesmasksorted

Constructor Summary

AccessConstructor and Description
public
Material()

Create an empty material

public
Material(final String id)

Create an empty material

public
Material(final Attribute... attributes)

Create a material with the specified attributes

public
Material(final String id, final Attribute... attributes)

Create a material with the specified attributes

public
Material(final Array<Attribute> attributes)

Create a material with the specified attributes

public
Material(final String id, final Array<Attribute> attributes)

Create a material with the specified attributes

public
Material(final Material copyFrom)

Create a material which is an exact copy of the specified material

public
Material(final String id, final Material copyFrom)

Create a material which is an exact copy of the specified material

Method Summary

Modifier and TypeMethod and Description
public Material
copy()

Create a copy of this material

public boolean
equals(Object other)

Overrides com.badlogic.gdx.graphics.g3d.Attributes.equals.

Implements java.util.Comparator.equals.

Indicates whether some other object is "equal to" this comparator.

public int
hashCode()

Overrides com.badlogic.gdx.graphics.g3d.Attributes.hashCode.

Returns a hash code value for this object.

Inherited from com.badlogic.gdx.graphics.g3d.Attributes:
attributesHashclearcomparecompareTogetgetgetgetMaskhasindexOfiteratorremovesamesamesetsetsetsetsetsetsizesort

Field Detail

counterback to summary
private static int counter
idback to summary
public String id

Constructor Detail

Materialback to summary
public Material()

Create an empty material

Materialback to summary
public Material(final String id)

Create an empty material

Materialback to summary
public Material(final Attribute... attributes)

Create a material with the specified attributes

Materialback to summary
public Material(final String id, final Attribute... attributes)

Create a material with the specified attributes

Materialback to summary
public Material(final Array<Attribute> attributes)

Create a material with the specified attributes

Materialback to summary
public Material(final String id, final Array<Attribute> attributes)

Create a material with the specified attributes

Materialback to summary
public Material(final Material copyFrom)

Create a material which is an exact copy of the specified material

Materialback to summary
public Material(final String id, final Material copyFrom)

Create a material which is an exact copy of the specified material

Method Detail

copyback to summary
public Material copy()

Create a copy of this material

equalsback to summary
public boolean equals(Object other)

Overrides com.badlogic.gdx.graphics.g3d.Attributes.equals.

Implements java.util.Comparator.equals.

Doc from java.util.Comparator.equals.

Indicates whether some other object is "equal to" this comparator. This method must obey the general contract of Object#equals(Object). Additionally, this method can return true only if the specified object is also a comparator and it imposes the same ordering as this comparator. Thus, comp1.equals(comp2) implies that signum(comp1.compare(o1, o2))==signum(comp2.compare(o1, o2)) for every object reference o1 and o2.

Note that it is always safe not to override Object.equals(Object). However, overriding this method may, in some cases, improve performance by allowing programs to determine that two distinct comparators impose the same order.

Annotations
@Override
hashCodeback to summary
public int hashCode()

Overrides com.badlogic.gdx.graphics.g3d.Attributes.hashCode.

Doc from java.lang.Object.hashCode.

Returns a hash code value for this object. This method is supported for the benefit of hash tables such as those provided by java.util.HashMap.

The general contract of hashCode is:

  • Whenever it is invoked on the same object more than once during an execution of a Java application, the hashCode method must consistently return the same integer, provided no information used in equals comparisons on the object is modified. This integer need not remain consistent from one execution of an application to another execution of the same application.
  • If two objects are equal according to the equals method, then calling the hashCode method on each of the two objects must produce the same integer result.
  • It is not required that if two objects are unequal according to the equals method, then calling the hashCode method on each of the two objects must produce distinct integer results. However, the programmer should be aware that producing distinct integer results for unequal objects may improve the performance of hash tables.
Annotations
@Override