Skip to content

Finalize attribute API in PShape #235

@processing-bot

Description

@processing-bot

Created by: codeanticode

The API to set/get generic attributes in PShape is not completely defined in PShape and implemented in PShapeOpenGL. Only the signature of the methods setAttrib(String name, int index, float... values), setAttrib(String name, int index, int... values), and setAttrib(String name, int index, boolean... values) are currently present in PShape. For completeness, the following additional setters should be defined in PShape and implemented in PShapeOpenGL:

  • public void setAttribPosition(String name, int index, float x, float y, float z)
  • public void setAttribNormal(String name, int index, float nx, float ny, float nz)
  • public void setAttribColor(String name, int index, int color)

and all the missing getters:

  • public PVector getAttribPosition(String name, int index, PVector vec)
  • public float getAttribPositionX(String name, int index)
  • public float getAttribPositionY(String name, int index)
  • public float getAttribPositionZ(String name, int index)
  • public PVector getAttribNormal(String name, int index, PVector vec)
  • public float getAttribNormalX(String name, int index)
  • public float getAttribNormalY(String name, int index)
  • public float getAttribNormalZ(String name, int index)
  • public int getAttribColor(String name, int index)
  • public float[] getAttrib(String name, int index, float[] values)
  • public int[] getAttrib(String name, int index, int[] values)
  • public boolean[] getAttrib(String name, int index, boolean[] values)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions