Tabnine Logo
MutableColor
Code IndexAdd Tabnine to your IDE (free)

How to use
MutableColor
in
us.ihmc.graphicsDescription.color

Best Java code snippets using us.ihmc.graphicsDescription.color.MutableColor (Showing top 20 results out of 315)

origin: us.ihmc/ihmc-graphics-description

public YoAppearanceRGBColor(MutableColor color, double transparency)
{
 this.color = new MutableColor(color);
 awtColor = new Color(this.color.getX(), this.color.getY(), this.color.getZ(), (float) (1.0 - transparency));
 setTransparency(transparency);
}
origin: us.ihmc/ihmc-graphics-description

public MutableColor(float x, float y, float z)
{
 set(x, y, z);
}
origin: us.ihmc/ihmc-jmonkey-engine-toolkit

public static ColorRGBA jMEColorRGBAFromVecMathColor3f(MutableColor originalColor, double alpha)
{
 float r = originalColor.getX();
 float g = originalColor.getY();
 float b = originalColor.getZ();
 return new ColorRGBA(r, g, b, (float) alpha);
}
origin: us.ihmc/ihmc-model-file-loader

public static MutableColor stringToColor(String color)
{
 String[] vecString = color.split("\\s+");
 MutableColor color3f = new MutableColor(Float.parseFloat(vecString[0]), Float.parseFloat(vecString[1]), Float.parseFloat(vecString[2]));
 return color3f;
}
origin: us.ihmc/ihmc-graphics-description

public float getGreen()
{
 return color.getY();
}
origin: us.ihmc/ihmc-graphics-description

public float getRed()
{
 return color.getX();
}
origin: us.ihmc/ihmc-graphics-description

public float getBlue()
{
 return color.getZ();
}
origin: us.ihmc/ihmc-graphics-description

private static YoArtifactOval yoArtifactOvalFromMessage(String name, YoVariable<?>[] vars, double[] consts, AppearanceDefinition appearance)
{
 return new YoArtifactOval(name, (YoDouble) vars[0], (YoDouble) vars[1], (YoDouble) vars[2], appearance.getColor().get());
}
origin: us.ihmc/ihmc-graphics-description

public static AppearanceDefinition Color(MutableColor color)
{
 return RGBColor(color.getX(), color.getY(), color.getZ());
}
origin: us.ihmc/ihmc-graphics-description

  public static MutableColor parseColor3f(String color)
  {
   try
   {
     StringTokenizer s = new StringTokenizer(color, ",");

     return new MutableColor(new float[] {Float.parseFloat(s.nextToken()), Float.parseFloat(s.nextToken()), Float.parseFloat(s.nextToken())});
   }
   catch (Exception e)
   {
     return null;
   }
  }
}
origin: us.ihmc/ihmc-graphics-description

private static YoArtifactPosition yoArtifactPositionFromMessage(String name, YoVariable<?>[] vars, double[] consts, AppearanceDefinition appearance)
{
 return new YoArtifactPosition(name, (YoDouble) vars[0], (YoDouble) vars[1], YoGraphicPosition.GraphicType.values()[(int) (double) consts[1]],
                appearance.getColor().get(), consts[0]);
}
origin: us.ihmc/ihmc-javafx-toolkit

private static Material convertMaterial(AppearanceDefinition appearance)
{
 float r = appearance.getColor().getX();
 float g = appearance.getColor().getY();
 float b = appearance.getColor().getZ();
 double transparency = appearance.getTransparency();
 if (appearance instanceof YoAppearanceRGBColor)
 {
   transparency = 1.0 - transparency;
 }
 Color color = new Color(r, g, b, transparency);
 PhongMaterial res = new PhongMaterial(color);
 res.setSpecularColor(Color.WHITE);
 return res;
}
origin: us.ihmc/ihmc-graphics-description

public YoAppearanceRGBColor(double red, double green, double blue, double transparency)
{
 color = new MutableColor((float) red, (float) green, (float) blue);
 awtColor = new Color((float) red, (float) green, (float) blue, (float) (1.0 - transparency));
 setTransparency(transparency);
}
origin: us.ihmc/ihmc-graphics-description

public void set(MutableColor other)
{
 set(other.x, other.y, other.z);
}
origin: us.ihmc/ihmc-graphics-description

private static YoArtifactPolygon yoArtifactPolygonFromMessage(String name, YoVariable<?>[] vars, double[] consts, AppearanceDefinition appearance)
{
 ReferenceFrame referenceFrame = ReferenceFrame.getWorldFrame();
 int i = 0;
 YoInteger yoNumVertices = (YoInteger) vars[i++];
 ArrayList<YoFramePoint2D> yoFramePoints = new ArrayList<YoFramePoint2D>();
 while (i < vars.length)
 {
   yoFramePoints.add(new YoFramePoint2D((YoDouble) vars[i++], (YoDouble) vars[i++], referenceFrame));
 }
 YoFrameConvexPolygon2D convexPolygon2d = new YoFrameConvexPolygon2D(yoFramePoints, yoNumVertices, referenceFrame);
 return new YoArtifactPolygon(name, convexPolygon2d, appearance.getColor().get(), consts[0] > 0);
}
origin: us.ihmc/ihmc-robot-data-logger

appearanceMessage.setR(obj.getAppearance().getColor().getX());
appearanceMessage.setG(obj.getAppearance().getColor().getY());
appearanceMessage.setB(obj.getAppearance().getColor().getZ());
appearanceMessage.setTransparency(obj.getAppearance().getTransparency());
origin: us.ihmc/ihmc-graphics-description

public YoAppearanceRGBColor(Color color, double transparency)
{
 this.color = new MutableColor(color);
 awtColor = new Color(color.getRed() / 255.0f, color.getGreen() / 255.0f, color.getBlue() / 255.0f, (float) (1.0 - transparency));
 setTransparency(transparency);
}
origin: us.ihmc/ihmc-graphics-description

public MutableColor(Color color)
{
 set(color);
}
origin: us.ihmc/ihmc-graphics-description

private static YoArtifactLineSegment2d yoArtifactLineSegment2DFromMessage(String name, YoVariable<?>[] vars, double[] consts,
                                     AppearanceDefinition appearance)
{
 YoFrameLineSegment2D segment = new YoFrameLineSegment2D((YoDouble) vars[0], (YoDouble) vars[1], (YoDouble) vars[2], (YoDouble) vars[3],
                             ReferenceFrame.getWorldFrame());
 return new YoArtifactLineSegment2d(name, segment, appearance.getColor().get());
}
origin: us.ihmc/ihmc-ros-tools

public void publish(Point3D[] points, MutableColor color, String frameId)
{
 PointCloud2 message = getMessage();
 message.getHeader().setFrameId(frameId);
 message.getHeader().setStamp(Time.fromMillis(System.currentTimeMillis()));
 message.setHeight(1);
 message.setWidth(points.length);
 message.setPointStep(pointType.getPointStep());
 int dataLength = pointType.getPointStep() * points.length;
 message.setRowStep(dataLength);
 message.setIsBigendian(false);
 message.setIsDense(true);
 message.setFields(pointType.getPointField());
 ChannelBuffer buffer = new LittleEndianHeapChannelBuffer(dataLength);
 for(int i=0;i<points.length;i++)
 {
   buffer.writeFloat((float)points[i].getX());
   buffer.writeFloat((float)points[i].getY());
   buffer.writeFloat((float)points[i].getZ());
   buffer.writeByte((int)color.getZ());
   buffer.writeByte((int)color.getY());
   buffer.writeByte((int)color.getX());
   buffer.writeByte(0); //dummy;
 }
 message.setData(buffer);
 publish(message);
}
us.ihmc.graphicsDescription.colorMutableColor

Most used methods

  • <init>
  • getX
  • getY
  • getZ
  • get
  • set
  • setX
  • setY
  • setZ

Popular in Java

  • Running tasks concurrently on multiple threads
  • getExternalFilesDir (Context)
  • startActivity (Activity)
  • onRequestPermissionsResult (Fragment)
  • HttpURLConnection (java.net)
    An URLConnection for HTTP (RFC 2616 [http://tools.ietf.org/html/rfc2616]) used to send and receive d
  • Deque (java.util)
    A linear collection that supports element insertion and removal at both ends. The name deque is shor
  • HashSet (java.util)
    HashSet is an implementation of a Set. All optional operations (adding and removing) are supported.
  • Map (java.util)
    A Map is a data structure consisting of a set of keys and values in which each key is mapped to a si
  • Random (java.util)
    This class provides methods that return pseudo-random values.It is dangerous to seed Random with the
  • Set (java.util)
    A Set is a data structure which does not allow duplicate elements.
  • Github Copilot alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now