Package com.io7m.smfj.processing.main
Class SMFMemoryMeshFilterAttributeTrim
- java.lang.Object
-
- com.io7m.smfj.processing.main.SMFMemoryMeshFilterAttributeTrim
-
- All Implemented Interfaces:
SMFMemoryMeshFilterType
public final class SMFMemoryMeshFilterAttributeTrim extends java.lang.Object implements SMFMemoryMeshFilterType
A filter that removes all mesh attributes that are not present in a list of names.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
NAME
The command name.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static SMFMemoryMeshFilterType
create(java.util.Set<SMFAttributeName> in_attributes)
Create a new filter.SMFPartialLogged<SMFMemoryMesh>
filter(SMFFilterCommandContext context, SMFMemoryMesh m)
Evaluate the filter on the given mesh.java.lang.String
name()
static SMFPartialLogged<SMFMemoryMeshFilterType>
parse(java.util.Optional<java.net.URI> file, int line, java.util.List<java.lang.String> text)
Attempt to parse a command.java.lang.String
syntax()
-
-
-
Field Detail
-
NAME
public static final java.lang.String NAME
The command name.- See Also:
- Constant Field Values
-
-
Method Detail
-
parse
public static SMFPartialLogged<SMFMemoryMeshFilterType> parse(java.util.Optional<java.net.URI> file, int line, java.util.List<java.lang.String> text)
Attempt to parse a command.- Parameters:
file
- The file, if anyline
- The linetext
- The text- Returns:
- A parsed command or a list of parse errors
-
create
public static SMFMemoryMeshFilterType create(java.util.Set<SMFAttributeName> in_attributes)
Create a new filter.- Parameters:
in_attributes
- The list of attributes to be preserved- Returns:
- A new filter
-
name
public java.lang.String name()
- Specified by:
name
in interfaceSMFMemoryMeshFilterType
- Returns:
- The name of the filter
-
syntax
public java.lang.String syntax()
- Specified by:
syntax
in interfaceSMFMemoryMeshFilterType
- Returns:
- The syntax of the filter
-
filter
public SMFPartialLogged<SMFMemoryMesh> filter(SMFFilterCommandContext context, SMFMemoryMesh m)
Description copied from interface:SMFMemoryMeshFilterType
Evaluate the filter on the given mesh.- Specified by:
filter
in interfaceSMFMemoryMeshFilterType
- Parameters:
context
- The filtering contextm
- A mesh- Returns:
- A filtered mesh, or a list or reasons why the filtering did not work
-
-