QcTextureSpec Struct
Data description of a procedurally generated block/item texture. More...
| Header: | #include <clientcore/textures/QcTextureSpec.h> |
Public Types
| enum class | Pattern { Noise, Speckle, Planks, Bricks, LogSide, …, Patches } |
Public Variables
| QStringList | bitmap |
| bool | detailed |
| QHash<QChar, QColor> | palette |
| QcTextureSpec::Pattern | pattern |
| double | phase |
| QColor | primary |
| QColor | secondary |
| quint32 | seed |
| std::optional<std::pair<int, int>> | tile |
| int | tilesHigh |
| int | tilesWide |
| double | variation |
Static Public Members
| const int | maxBitmapRows |
| const int | maxPaletteEntries |
Related Non-Members
| std::optional<QcTextureSpec::Pattern> | qcTexturePatternFromName(const QString &name) |
Detailed Description
Member Type Documentation
enum class QcTextureSpec::Pattern
What the texture shows; the colours, the seed and the bitmap fill it in.
| Constant | Value | Description |
|---|---|---|
QcTextureSpec::Pattern::Noise | 0 | the primary colour with pixel variation |
QcTextureSpec::Pattern::Speckle | 1 | like Noise with scattered pixels in the secondary colour |
QcTextureSpec::Pattern::Planks | 2 | staggered boards with seams |
QcTextureSpec::Pattern::Bricks | 3 | bricks (primary) in mortar |
QcTextureSpec::Pattern::LogSide | 4 | bark of a log |
QcTextureSpec::Pattern::LogTop | 5 | a log's cut with growth rings |
QcTextureSpec::Pattern::Leaves | 6 | leaves with gaps |
QcTextureSpec::Pattern::Glass | 7 | a pane with a frame; keeps transparency |
QcTextureSpec::Pattern::GrassSide | 8 | soil with a grass rim on top |
QcTextureSpec::Pattern::Ore | 9 | stone (primary) with clusters of ore (secondary) |
QcTextureSpec::Pattern::Water | 10 | water with waves, animated |
QcTextureSpec::Pattern::Tool | 11 | a plain tool on the diagonal: handle and head |
QcTextureSpec::Pattern::Lump | 12 | a round lump (primary, spots secondary) on a transparent background |
QcTextureSpec::Pattern::Pickaxe | 13 | tool icon: a pickaxe |
QcTextureSpec::Pattern::Axe | 14 | tool icon: an axe |
QcTextureSpec::Pattern::Shovel | 15 | tool icon: a shovel |
QcTextureSpec::Pattern::Sword | 16 | tool icon: a sword |
QcTextureSpec::Pattern::Stick | 17 | tool icon: a stick without head |
QcTextureSpec::Pattern::Ingot | 18 | item icon: an ingot |
QcTextureSpec::Pattern::Gem | 19 | item icon: a cut gem |
QcTextureSpec::Pattern::Sapling | 20 | Small plant: a stem in the secondary colour under a leafy crown in the primary colour. |
QcTextureSpec::Pattern::Face | 21 | Eyes (primary with secondary pupils) and a mouth on a transparent background, for a thin box in front of a head. |
QcTextureSpec::Pattern::Furnace | 22 | Machine front: a stone face (primary) with a dark fire opening (secondary) and a grate. |
QcTextureSpec::Pattern::Torch | 23 | Torch stretched over a thin box: a flame (secondary) on top of a stick (primary). |
QcTextureSpec::Pattern::TorchItem | 24 | Torch as a flat icon on a transparent background. |
QcTextureSpec::Pattern::Ladder | 25 | Two rails with rungs (primary) on a transparent background. |
QcTextureSpec::Pattern::DoorLower | 26 | Door halves: vertical boards (primary) in a frame (secondary); the lower one with a handle, the upper one with a window. |
QcTextureSpec::Pattern::DoorUpper | 27 | the upper half, with the window |
QcTextureSpec::Pattern::DoorItem | 28 | The whole door as an icon: both halves in a narrow frame, the window above, the handle below, on a transparent background (decision E-831). |
QcTextureSpec::Pattern::Trapdoor | 29 | Hatch of boards with a frame and two openings. |
QcTextureSpec::Pattern::ChestSide | 30 | Chest: boards (primary) with darker edges and a lid seam; the front adds a latch (secondary), the top only has the frame. |
QcTextureSpec::Pattern::ChestFront | 31 | the front with the latch |
QcTextureSpec::Pattern::ChestTop | 32 | the top with the frame |
QcTextureSpec::Pattern::Lava | 33 | Molten rock: glowing streaks (secondary) in a darker flow (primary). |
QcTextureSpec::Pattern::Fire | 34 | Flames on a transparent background (decision E-392): tongues rising from the bottom, the secondary colour in their core, the primary at their edges. |
QcTextureSpec::Pattern::Flower | 35 | Blossom (primary) with a light centre on a stem with two leaves (secondary). |
QcTextureSpec::Pattern::TallGrass | 36 | Blades of grass of different heights (primary, tips secondary). |
QcTextureSpec::Pattern::Mushroom | 37 | Cap (primary, lighter spots) on a pale stem. |
QcTextureSpec::Pattern::SugarCane | 38 | Three jointed stalks (primary) with a few leaves (secondary). |
QcTextureSpec::Pattern::Bottle | 39 | Glass bottle with a cork; the contents in the secondary colour (transparent: empty). |
QcTextureSpec::Pattern::Bucket | 40 | Metal bucket (primary); the contents seen from above in the secondary colour. |
QcTextureSpec::Pattern::Lantern | 41 | Lamp housing (primary) around a glowing window (secondary) with bars, for a stretched box. |
QcTextureSpec::Pattern::Limb | 42 | Bare skin of an arm or hand (meant to be tinted): rounded shading towards the edges, soft mottling, at the bottom a knuckle line and fingers (secondary). |
QcTextureSpec::Pattern::Sleeve | 43 | Sleeve fabric (meant to be tinted): fine weave, rounded shading and folds, a darker cuff with a stitched seam at the bottom. |
QcTextureSpec::Pattern::Nugget | 44 | Patterns of QcTextureCraftPatterns (storage blocks, crafted items, small plants). A few small grains (primary, highlights secondary) on a transparent background. |
QcTextureSpec::Pattern::MetalBlock | 45 | Storage block: a solid face (primary) with a bevelled frame and highlights (secondary). |
QcTextureSpec::Pattern::Bars | 46 | Vertical bars (primary) with two cross bars on a transparent background. |
QcTextureSpec::Pattern::Bookshelf | 47 | Bookshelf side: planks (primary) holding two rows of coloured book spines. |
QcTextureSpec::Pattern::Paper | 48 | Sheet of paper (primary) with faint lines (secondary). |
QcTextureSpec::Pattern::Book | 49 | Book: cover (primary) with pages (secondary) at the edge. |
QcTextureSpec::Pattern::Bowl | 50 | Wooden bowl (primary) seen from the side; Stew fills it with soup (secondary). |
QcTextureSpec::Pattern::Stew | 51 | the bowl filled with soup |
QcTextureSpec::Pattern::Apple | 52 | Round fruit (primary) with a stalk and leaf (secondary). |
QcTextureSpec::Pattern::Leather | 53 | Hide (primary) with stitches (secondary); Scrap is a ragged small piece of it. |
QcTextureSpec::Pattern::Scrap | 54 | a ragged small piece of hide |
QcTextureSpec::Pattern::String | 55 | Coiled thread (primary). |
QcTextureSpec::Pattern::Cobweb | 56 | Web of threads (primary) on a transparent background. |
QcTextureSpec::Pattern::DeadBush | 57 | Dry twigs (primary) without leaves. |
QcTextureSpec::Pattern::Fern | 58 | Fern fronds (primary, tips secondary). |
QcTextureSpec::Pattern::FireflyGlass | 59 | Glass (primary) with glowing dots (secondary); keeps partial transparency. |
QcTextureSpec::Pattern::BarrelSide | 60 | Barrel: vertical staves (primary) with metal hoops (secondary); the top shows a lid. |
QcTextureSpec::Pattern::BarrelTop | 61 | the top with the lid |
QcTextureSpec::Pattern::StainedGlass | 62 | Tinted glass: a frame (secondary) around a clearly coloured pane (primary); keeps partial transparency. |
QcTextureSpec::Pattern::RawChunk | 63 | Raw metal (decision E-740): a lumpy chunk (primary, stony spots and rim secondary) on a transparent background, and the block of raw metal: rounded lumps with crevices (secondary) between them. |
QcTextureSpec::Pattern::RawBlock | 64 | the block of raw metal |
QcTextureSpec::Pattern::Chain | 65 | Chain links (primary, highlights secondary) on a transparent background, running from top to bottom through the middle four columns; ChainAcross runs from left to right through the middle four rows (decision E-742). |
QcTextureSpec::Pattern::ChainAcross | 66 | links running from left to right |
QcTextureSpec::Pattern::BackpackSide | 67 | A leather backpack (decision E-832): sides with a strap and a buckle (secondary), the front with a stitched flap and its buckle, the top with a carrying loop; all with a darker seam at the edges. BackpackItem is its icon: the body with a loop, a lighter flap with its buckle and a pocket, on a transparent background. |
QcTextureSpec::Pattern::BackpackFront | 68 | the front with the flap |
QcTextureSpec::Pattern::BackpackTop | 69 | the top with the loop |
QcTextureSpec::Pattern::BackpackItem | 70 | the icon |
QcTextureSpec::Pattern::Hoe | 71 | Patterns of QcTextureFarmPatterns (decision E-289): a hoe (tool head like the others) ... |
QcTextureSpec::Pattern::Crop | 72 | ... crop plants on a transparent background: stalks (primary) with ears (secondary), leafy tufts (primary) showing roots or tubers (secondary) at the bottom, a thin stem with leaves ... |
QcTextureSpec::Pattern::RootCrop | 73 | leafy tufts with roots or tubers |
QcTextureSpec::Pattern::Stem | 74 | a thin stem with leaves |
QcTextureSpec::Pattern::Farmland | 75 | ... tilled soil with furrows (primary, furrows secondary) ... |
QcTextureSpec::Pattern::PumpkinSide | 76 | ... fruit blocks: a ribbed pumpkin side and its top with the stalk, a striped melon ... |
QcTextureSpec::Pattern::PumpkinTop | 77 | the pumpkin's top with the stalk |
QcTextureSpec::Pattern::MelonSide | 78 | the striped melon |
QcTextureSpec::Pattern::Wheat | 79 | ... and food icons: a sheaf of wheat, a loaf, a carrot, a melon slice, a pie. |
QcTextureSpec::Pattern::Bread | 80 | a loaf |
QcTextureSpec::Pattern::Carrot | 81 | a carrot |
QcTextureSpec::Pattern::MelonSlice | 82 | a melon slice |
QcTextureSpec::Pattern::Pie | 83 | a pie |
QcTextureSpec::Pattern::HaySide | 84 | ... the hay bale: straw running from top to bottom (primary, darker stalks secondary) tied by two bands, its top with cut stalk ends; and flint and steel: a steel striker (secondary) bent around a dark flint chip (primary), an item icon (decision E-393). |
QcTextureSpec::Pattern::HayTop | 85 | the hay bale's top |
QcTextureSpec::Pattern::FlintAndSteel | 86 | flint and steel |
QcTextureSpec::Pattern::CarvedPumpkin | 87 | a pumpkin face |
QcTextureSpec::Pattern::Shears | 88 | shears |
QcTextureSpec::Pattern::Helmet | 89 | Patterns of QcTextureArmourPatterns (decision E-235): item icons in the material (primary) with a light upper edge (secondary) ... |
QcTextureSpec::Pattern::Chestplate | 90 | chestplate icon |
QcTextureSpec::Pattern::Leggings | 91 | leggings icon |
QcTextureSpec::Pattern::Boots | 92 | boots icon |
QcTextureSpec::Pattern::ArmourPlate | 93 | ... and what armour looks like on a body: a riveted plate, stitched leather, a helmet front with an opening for the face, a visor with eye slits, polished trim with a ridge. |
QcTextureSpec::Pattern::ArmourLeather | 94 | stitched leather |
QcTextureSpec::Pattern::HelmetFront | 95 | helmet front with an opening |
QcTextureSpec::Pattern::Visor | 96 | visor with eye slits |
QcTextureSpec::Pattern::ArmourTrim | 97 | polished trim |
QcTextureSpec::Pattern::ArmourStand | 98 | Icon of an armour stand: a post with bars (primary) on a stone plate (secondary). |
QcTextureSpec::Pattern::Emblem | 99 | Pixel art from bitmap (QcTextureEmblem): each character picks a colour of palette, any other character (and every pixel the bitmap leaves out) shows woven cloth in the primary colour. For cape emblems and hems (decision E-241). |
QcTextureSpec::Pattern::Dust | 100 | Patterns of QcTextureSignalPatterns (decision E-333): loose grains of the wire (primary, some secondary) on a transparent background, a lever icon (stick primary, base secondary), a repeater's slab (primary) with a wire and arrow (secondary), a piston's stone side (primary) in a wooden frame (secondary). |
QcTextureSpec::Pattern::Lever | 101 | lever icon |
QcTextureSpec::Pattern::Repeater | 102 | repeater slab |
QcTextureSpec::Pattern::PistonSide | 103 | piston side |
QcTextureSpec::Pattern::Hopper | 104 | Signal machines (decision E-342): a hopper's riveted iron side (primary, rivets and seams secondary), its rim seen from above around a dark bowl (secondary), its item icon (a funnel), a comparator's slab (primary) with three torch spots and a wire (secondary), an observer's face (primary) with a slit of eyes (secondary), its back with the output spot (secondary), its side with an arrow, and the fronts of dispenser and dropper: a stone face (primary) with a round mouth or a narrow slot (secondary). Rail: two iron rails (primary) on wooden sleepers (secondary), as an item icon; minecart: an open iron tub (primary) with a dark inside and wheels (secondary), as an item icon (decision E-382). |
QcTextureSpec::Pattern::HopperTop | 105 | hopper rim from above |
QcTextureSpec::Pattern::HopperItem | 106 | hopper icon |
QcTextureSpec::Pattern::Comparator | 107 | comparator slab |
QcTextureSpec::Pattern::ObserverFace | 108 | observer face |
QcTextureSpec::Pattern::ObserverBack | 109 | observer back |
QcTextureSpec::Pattern::ObserverSide | 110 | observer side |
QcTextureSpec::Pattern::ObserverTop | 111 | observer top |
QcTextureSpec::Pattern::ObserverBottom | 112 | observer bottom |
QcTextureSpec::Pattern::Dispenser | 113 | dispenser front |
QcTextureSpec::Pattern::Dropper | 114 | dropper front |
QcTextureSpec::Pattern::Rail | 115 | rail icon |
QcTextureSpec::Pattern::Minecart | 116 | minecart icon |
QcTextureSpec::Pattern::Bow | 117 | Patterns of QcTextureRangedPatterns (decision E-425): a bow (wood primary, string secondary), an arrow (shaft primary, fletching secondary), a feather (vanes primary, quill secondary) and a bone (primary, its knobs shaded by secondary; decision E-426), all icons on the diagonal. |
QcTextureSpec::Pattern::BowDrawn1 | 118 | The bow drawn with an arrow on it, in its three stages (decision E-987): limbs and string as Bow, pulled back further from stage to stage. |
QcTextureSpec::Pattern::BowDrawn2 | 119 | the second stage |
QcTextureSpec::Pattern::BowDrawn3 | 120 | the third stage, fully drawn |
QcTextureSpec::Pattern::Arrow | 121 | an arrow |
QcTextureSpec::Pattern::Feather | 122 | a feather |
QcTextureSpec::Pattern::Bone | 123 | a bone |
QcTextureSpec::Pattern::FishingRod | 124 | A fishing rod (decision E-503): the rod (primary) on the diagonal, its line (secondary) hanging from the tip with a hook. |
QcTextureSpec::Pattern::MossyBricks | 125 | Patterns of QcTextureBuildingPatterns (decision E-750): bricks (primary) with moss (secondary) in patches and in the mortar, bricks with mortar (secondary) and two cracks, a chiseled face of nested frames, a smooth face in a thin frame (secondary) and a glazed ornament (secondary on primary) without symmetry, so turned blocks show their facing. |
QcTextureSpec::Pattern::CrackedBricks | 126 | cracked bricks |
QcTextureSpec::Pattern::ChiseledBricks | 127 | a chiseled face |
QcTextureSpec::Pattern::SmoothStone | 128 | a smooth face |
QcTextureSpec::Pattern::GlazedTerracotta | 129 | a glazed ornament |
QcTextureSpec::Pattern::Icon | 130 | Pixel art like Emblem, but every pixel the palette does not colour is transparent: item icons from data (signs, compass and clock, decisions E-766, E-769). |
QcTextureSpec::Pattern::CakeTop | 131 | Patterns of QcTextureKitchenPatterns (decisions E-772 to E-774): the cake's frosted top (primary) with berries, its side (frosting primary over sponge secondary, the upper half clear) and its icon, the campfire's icon (logs primary, their ends secondary, a flame) and a round lily pad with a notch and veins (secondary). |
QcTextureSpec::Pattern::CakeSide | 132 | the cake's side |
QcTextureSpec::Pattern::CakeItem | 133 | the cake's icon |
QcTextureSpec::Pattern::CampfireItem | 134 | the campfire's icon |
QcTextureSpec::Pattern::LilyPad | 135 | a lily pad |
QcTextureSpec::Pattern::ItemFrame | 136 | Patterns of QcTexturePaintingPatterns (decision E-791): an item frame (a wooden border in the primary colour around leather in the secondary) and painting motifs drawn over a canvas of tilesWide x tilesHigh blocks: a landscape of hills under a sun, the sea with a sail, an abstract of coloured fields between dark lines, a night with stars over mountains, a sunset over water and rings spreading over a ground; primary and secondary colour and the seed vary each. |
QcTextureSpec::Pattern::PaintingLandscape | 137 | hills under a sun |
QcTextureSpec::Pattern::PaintingSea | 138 | the sea with a sail |
QcTextureSpec::Pattern::PaintingAbstract | 139 | coloured fields between dark lines |
QcTextureSpec::Pattern::PaintingNight | 140 | stars over mountains |
QcTextureSpec::Pattern::PaintingSunset | 141 | a sunset over water |
QcTextureSpec::Pattern::PaintingRings | 142 | rings spreading over a ground |
QcTextureSpec::Pattern::Ice | 143 | Ice without a frame, tiling without seams (QcTextureBuildingPatterns): a smooth face (primary, its alpha kept, so ice stays translucent and blue ice opaque) with soft diagonal streaks (secondary); packed ice is opaque with fine wandering cracks (secondary). |
QcTextureSpec::Pattern::PackedIce | 144 | packed ice |
QcTextureSpec::Pattern::Slime | 145 | Slime (decision E-860): a translucent fill in the primary colour (its alpha kept) with a one-pixel rim in the secondary colour (its alpha kept too); the slime block draws it on its outer cube and, darker and more opaque, on its inner core cube. |
QcTextureSpec::Pattern::Reeds | 146 | Reeds (decision E-850): thin stalks with long leaves (primary), a few with a brown head (secondary). |
QcTextureSpec::Pattern::Patches | 147 | A creature's coat (QcTextureCoatPatterns, decision E-880): a few large smooth-edged patches (secondary) on the primary colour, like a Holstein cow; the seed places them. |
Member Variable Documentation
QStringList QcTextureSpec::bitmap
Emblem and Icon: the rows of the picture, one character per pixel (QcTextureEmblem). The initialisers of this field and the next keep aggregate initialisations that leave them out free of -Wmissing-field-initializers.
bool QcTextureSpec::detailed
Whether the picture is the base of a texture enlarged above 16 x 16 (QcTextureDetail, decision E-1000): a pattern may then add parts the 16 x 16 icon leaves out because they would be lost or crowded at one pixel, such as a sword's guard. The 16 x 16 picture stays unchanged.
QHash<QChar, QColor> QcTextureSpec::palette
Emblem and Icon: the colour of each character of the bitmap.
QcTextureSpec::Pattern QcTextureSpec::pattern
The pattern.
double QcTextureSpec::phase
Where in its loop an animation frame lies (decision E-878): frame / frames, in [0, 1). The patterns that animate (fire, lava, water) move with it so the last frame leads seamlessly into the first; 0 paints the still texture.
QColor QcTextureSpec::primary
The main colour.
QColor QcTextureSpec::secondary
The second colour (seams, spots, contents).
quint32 QcTextureSpec::seed
Varies the pixels and the placement of details; the same seed gives the same texture.
double QcTextureSpec::variation
How strongly the pixels vary around their colour, 0..1.
Related Non-Members
std::optional<QcTextureSpec::Pattern> qcTexturePatternFromName(const QString &name)
Returns the pattern named name in the content ("planks", "log_side", ...); nothing for an unknown name.